1. 05 May, 2014 34 commits
  2. 25 Apr, 2014 6 commits
    • Jay Cornwall's avatar
      iommu/amd: Fix PASID format in INVALIDATE_IOTLB_PAGES command · 81528093
      Jay Cornwall authored
      commit e8d2d82d upstream.
      
      This patch corrects the PASID format in the INVALIDATE_IOTLB_PAGES
      command, which was caused by incorrect information in
      the AMD IOMMU Architectural Specification v2.01 document.
      
          Incorrect format:
               cmd->data[0][16:23] = PASID[7:0]
               cmd->data[1][16:27] = PASID[19:8]
      
           Correct format:
               cmd->data[0][16:23] = PASID[15:8]
               cmd->data[1][16:23] = PASID[7:0]
      
      However, this does not affect the IOMMUv2 hardware implementation,
      and has been corrected since version 2.02 of the specification
      (available through AMD NDA).
      Signed-off-by: default avatarJay Cornwall <jay.cornwall@amd.com>
      Reviewed-by: default avatarSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      81528093
    • Tedd Ho-Jeong An's avatar
      Bluetooth: Add support for Intel Bluetooth device [8087:0a2a] · d4527ea4
      Tedd Ho-Jeong An authored
      commit ef4e5e4a upstream.
      
      This patch adds support for new Intel Bluetooth device.
      
      T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0a2a Rev= 0.01
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      d4527ea4
    • Ingo Molnar's avatar
      drivers/net: tulip_remove_one needs to call pci_disable_device() · 831bb557
      Ingo Molnar authored
      commit c321f7d7 upstream.
      
      Otherwise the device is not completely shut down.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      831bb557
    • Petr Tesarik's avatar
      /dev/mem: handle out-of-bounds read/write · 3566e03b
      Petr Tesarik authored
      commit 08d2d00b upstream.
      
      The loff_t type may be wider than phys_addr_t (e.g. on 32-bit systems).
      Consequently, the file offset may be truncated in the assignment.
      Currently, /dev/mem wraps around, which may cause applications to read
      or write incorrect regions of memory by accident.
      
      Let's follow POSIX file semantics here and return 0 when reading from
      and -EFBIG when writing to an offset that cannot be represented by a
      phys_addr_t.
      
      Note that the conditional is optimized out by the compiler if loff_t
      has the same size as phys_addr_t.
      Signed-off-by: default avatarPetr Tesarik <ptesarik@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      3566e03b
    • Emil Goode's avatar
      brcmsmac: fix deadlock on missing firmware · de0b7b0d
      Emil Goode authored
      commit 8fc1e8c2 upstream.
      
      When brcm80211 firmware is not installed networking hangs.
      A deadlock happens because we call ieee80211_unregister_hw()
      from the .start callback of struct ieee80211_ops. When .start
      is called we are under rtnl lock and ieee80211_unregister_hw()
      tries to take it again.
      
      Function call stack:
      
      dev_change_flags()
      	__dev_change_flags()
      		__dev_open()
      			ASSERT_RTNL() <-- Assert rtnl lock
      			ops->ndo_open()
      
      .ndo_open = ieee80211_open,
      
      ieee80211_open()
      	ieee80211_do_open()
      		drv_start()
      			local->ops->start()
      
      .start = brcms_ops_start,
      
      brcms_ops_start()
      	brcms_remove()
      		ieee80211_unregister_hw()
      			rtnl_lock() <-- Here we deadlock
      
      Introduced by:
      commit 25b5632f
      ("brcmsmac: request firmware in .start() callback")
      
      This patch fixes the bug by removing the call to brcms_remove()
      and moves the brcms_request_fw() call to the top of the .start
      callback to not initiate anything unless firmware is installed.
      Signed-off-by: default avatarEmil Goode <emilgoode@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      de0b7b0d
    • Alexei Starovoitov's avatar
      openvswitch: fix vport-netdev unregister · 7d4f4737
      Alexei Starovoitov authored
      commit b07c2651 upstream.
      
      The combination of two commits:
      commit 8e4e1713
      ("openvswitch: Simplify datapath locking.")
      commit 2537b4dd
      ("openvswitch:: link upper device for port devices")
      
      introduced a bug where upper_dev wasn't unlinked upon
      netdev_unregister notification
      
      The following steps:
      
        modprobe openvswitch
        ovs-dpctl add-dp test
        ip tuntap add dev tap1 mode tap
        ovs-dpctl add-if test tap1
        ip tuntap del dev tap1 mode tap
      
      are causing multiple warnings:
      
      [   62.747557] gre: GRE over IPv4 demultiplexor driver
      [   62.749579] openvswitch: Open vSwitch switching datapath
      [   62.755087] device test entered promiscuous mode
      [   62.765911] device tap1 entered promiscuous mode
      [   62.766033] IPv6: ADDRCONF(NETDEV_UP): tap1: link is not ready
      [   62.769017] ------------[ cut here ]------------
      [   62.769022] WARNING: CPU: 1 PID: 3267 at net/core/dev.c:5501 rollback_registered_many+0x20f/0x240()
      [   62.769023] Modules linked in: openvswitch gre vxlan ip_tunnel libcrc32c ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_CHECKSUM iptable_mangle ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc vhost_net macvtap macvlan vhost kvm_intel kvm dm_crypt iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi hid_generic mxm_wmi eeepc_wmi asus_wmi sparse_keymap dm_multipath psmouse serio_raw usbhid hid parport_pc ppdev firewire_ohci lpc_ich firewire_core e1000e crc_itu_t binfmt_misc igb dca ptp pps_core mac_hid wmi lp parport i2o_config i2o_block video
      [   62.769051] CPU: 1 PID: 3267 Comm: ip Not tainted 3.12.0-rc3+ #60
      [   62.769052] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
      [   62.769053]  0000000000000009 ffff8807f25cbd28 ffffffff8175e575 0000000000000006
      [   62.769055]  0000000000000000 ffff8807f25cbd68 ffffffff8105314c ffff8807f25cbd58
      [   62.769057]  ffff8807f2634000 ffff8807f25cbdc8 ffff8807f25cbd88 ffff8807f25cbdc8
      [   62.769059] Call Trace:
      [   62.769062]  [<ffffffff8175e575>] dump_stack+0x55/0x76
      [   62.769065]  [<ffffffff8105314c>] warn_slowpath_common+0x8c/0xc0
      [   62.769067]  [<ffffffff8105319a>] warn_slowpath_null+0x1a/0x20
      [   62.769069]  [<ffffffff8162a04f>] rollback_registered_many+0x20f/0x240
      [   62.769071]  [<ffffffff8162a101>] rollback_registered+0x31/0x40
      [   62.769073]  [<ffffffff8162a488>] unregister_netdevice_queue+0x58/0x90
      [   62.769075]  [<ffffffff8154f900>] __tun_detach+0x140/0x340
      [   62.769077]  [<ffffffff8154fb36>] tun_chr_close+0x36/0x60
      [   62.769080]  [<ffffffff811bddaf>] __fput+0xff/0x260
      [   62.769082]  [<ffffffff811bdf5e>] ____fput+0xe/0x10
      [   62.769084]  [<ffffffff8107b515>] task_work_run+0xb5/0xe0
      [   62.769087]  [<ffffffff810029b9>] do_notify_resume+0x59/0x80
      [   62.769089]  [<ffffffff813a41fe>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [   62.769091]  [<ffffffff81770f5a>] int_signal+0x12/0x17
      [   62.769093] ---[ end trace 838756c62e156ffb ]---
      [   62.769481] ------------[ cut here ]------------
      [   62.769485] WARNING: CPU: 1 PID: 92 at fs/sysfs/inode.c:325 sysfs_hash_and_remove+0xa9/0xb0()
      [   62.769486] sysfs: can not remove 'master', no directory
      [   62.769486] Modules linked in: openvswitch gre vxlan ip_tunnel libcrc32c ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_CHECKSUM iptable_mangle ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc vhost_net macvtap macvlan vhost kvm_intel kvm dm_crypt iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi hid_generic mxm_wmi eeepc_wmi asus_wmi sparse_keymap dm_multipath psmouse serio_raw usbhid hid parport_pc ppdev firewire_ohci lpc_ich firewire_core e1000e crc_itu_t binfmt_misc igb dca ptp pps_core mac_hid wmi lp parport i2o_config i2o_block video
      [   62.769514] CPU: 1 PID: 92 Comm: kworker/1:2 Tainted: G        W    3.12.0-rc3+ #60
      [   62.769515] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
      [   62.769518] Workqueue: events ovs_dp_notify_wq [openvswitch]
      [   62.769519]  0000000000000009 ffff880807ad3ac8 ffffffff8175e575 0000000000000006
      [   62.769521]  ffff880807ad3b18 ffff880807ad3b08 ffffffff8105314c ffff880807ad3b28
      [   62.769523]  0000000000000000 ffffffff81a87a1f ffff8807f2634000 ffff880037038500
      [   62.769525] Call Trace:
      [   62.769528]  [<ffffffff8175e575>] dump_stack+0x55/0x76
      [   62.769529]  [<ffffffff8105314c>] warn_slowpath_common+0x8c/0xc0
      [   62.769531]  [<ffffffff81053236>] warn_slowpath_fmt+0x46/0x50
      [   62.769533]  [<ffffffff8123e7e9>] sysfs_hash_and_remove+0xa9/0xb0
      [   62.769535]  [<ffffffff81240e96>] sysfs_remove_link+0x26/0x30
      [   62.769538]  [<ffffffff81631ef7>] __netdev_adjacent_dev_remove+0xf7/0x150
      [   62.769540]  [<ffffffff81632037>] __netdev_adjacent_dev_unlink_lists+0x27/0x50
      [   62.769542]  [<ffffffff8163213a>] __netdev_adjacent_dev_unlink_neighbour+0x3a/0x50
      [   62.769544]  [<ffffffff8163218d>] netdev_upper_dev_unlink+0x3d/0x140
      [   62.769548]  [<ffffffffa033c2db>] netdev_destroy+0x4b/0x80 [openvswitch]
      [   62.769550]  [<ffffffffa033b696>] ovs_vport_del+0x46/0x60 [openvswitch]
      [   62.769552]  [<ffffffffa0335314>] ovs_dp_detach_port+0x44/0x60 [openvswitch]
      [   62.769555]  [<ffffffffa0336574>] ovs_dp_notify_wq+0xb4/0x150 [openvswitch]
      [   62.769557]  [<ffffffff81075c28>] process_one_work+0x1d8/0x6a0
      [   62.769559]  [<ffffffff81075bc8>] ? process_one_work+0x178/0x6a0
      [   62.769562]  [<ffffffff8107659b>] worker_thread+0x11b/0x370
      [   62.769564]  [<ffffffff81076480>] ? rescuer_thread+0x350/0x350
      [   62.769566]  [<ffffffff8107f44a>] kthread+0xea/0xf0
      [   62.769568]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
      [   62.769570]  [<ffffffff81770bac>] ret_from_fork+0x7c/0xb0
      [   62.769572]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
      [   62.769573] ---[ end trace 838756c62e156ffc ]---
      [   62.769574] ------------[ cut here ]------------
      [   62.769576] WARNING: CPU: 1 PID: 92 at fs/sysfs/inode.c:325 sysfs_hash_and_remove+0xa9/0xb0()
      [   62.769577] sysfs: can not remove 'upper_test', no directory
      [   62.769577] Modules linked in: openvswitch gre vxlan ip_tunnel libcrc32c ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_CHECKSUM iptable_mangle ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc vhost_net macvtap macvlan vhost kvm_intel kvm dm_crypt iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi hid_generic mxm_wmi eeepc_wmi asus_wmi sparse_keymap dm_multipath psmouse serio_raw usbhid hid parport_pc ppdev firewire_ohci lpc_ich firewire_core e1000e crc_itu_t binfmt_misc igb dca ptp pps_core mac_hid wmi lp parport i2o_config i2o_block video
      [   62.769603] CPU: 1 PID: 92 Comm: kworker/1:2 Tainted: G        W    3.12.0-rc3+ #60
      [   62.769604] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
      [   62.769606] Workqueue: events ovs_dp_notify_wq [openvswitch]
      [   62.769607]  0000000000000009 ffff880807ad3ac8 ffffffff8175e575 0000000000000006
      [   62.769609]  ffff880807ad3b18 ffff880807ad3b08 ffffffff8105314c ffff880807ad3b58
      [   62.769611]  0000000000000000 ffff880807ad3bd9 ffff8807f2634000 ffff880037038500
      [   62.769613] Call Trace:
      [   62.769615]  [<ffffffff8175e575>] dump_stack+0x55/0x76
      [   62.769617]  [<ffffffff8105314c>] warn_slowpath_common+0x8c/0xc0
      [   62.769619]  [<ffffffff81053236>] warn_slowpath_fmt+0x46/0x50
      [   62.769621]  [<ffffffff8123e7e9>] sysfs_hash_and_remove+0xa9/0xb0
      [   62.769622]  [<ffffffff81240e96>] sysfs_remove_link+0x26/0x30
      [   62.769624]  [<ffffffff81631f22>] __netdev_adjacent_dev_remove+0x122/0x150
      [   62.769627]  [<ffffffff81632037>] __netdev_adjacent_dev_unlink_lists+0x27/0x50
      [   62.769629]  [<ffffffff8163213a>] __netdev_adjacent_dev_unlink_neighbour+0x3a/0x50
      [   62.769631]  [<ffffffff8163218d>] netdev_upper_dev_unlink+0x3d/0x140
      [   62.769633]  [<ffffffffa033c2db>] netdev_destroy+0x4b/0x80 [openvswitch]
      [   62.769636]  [<ffffffffa033b696>] ovs_vport_del+0x46/0x60 [openvswitch]
      [   62.769638]  [<ffffffffa0335314>] ovs_dp_detach_port+0x44/0x60 [openvswitch]
      [   62.769640]  [<ffffffffa0336574>] ovs_dp_notify_wq+0xb4/0x150 [openvswitch]
      [   62.769642]  [<ffffffff81075c28>] process_one_work+0x1d8/0x6a0
      [   62.769644]  [<ffffffff81075bc8>] ? process_one_work+0x178/0x6a0
      [   62.769646]  [<ffffffff8107659b>] worker_thread+0x11b/0x370
      [   62.769648]  [<ffffffff81076480>] ? rescuer_thread+0x350/0x350
      [   62.769650]  [<ffffffff8107f44a>] kthread+0xea/0xf0
      [   62.769652]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
      [   62.769654]  [<ffffffff81770bac>] ret_from_fork+0x7c/0xb0
      [   62.769656]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
      [   62.769657] ---[ end trace 838756c62e156ffd ]---
      [   62.769724] device tap1 left promiscuous mode
      
      This patch also affects moving devices between net namespaces.
      
      OVS used to ignore netns move notifications which caused problems.
      Like:
        ovs-dpctl add-if test tap1
        ip link set tap1 netns 3512
      and then removing tap1 inside the namespace will cause hang on missing dev_put.
      
      With this patch OVS will detach dev upon receiving netns move event.
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      7d4f4737