1. 08 3月, 2016 9 次提交
    • N
      vmxnet3: avoid calling pskb_may_pull with interrupts disabled · cec05562
      Neil Horman 提交于
      vmxnet3 has a function vmxnet3_parse_and_copy_hdr which, among other operations,
      uses pskb_may_pull to linearize the header portion of an skb.  That operation
      eventually uses local_bh_disable/enable to ensure that it doesn't race with the
      drivers bottom half handler.  Unfortunately, vmxnet3 preforms this
      parse_and_copy operation with a spinlock held and interrupts disabled.  This
      causes us to run afoul of the WARN_ON_ONCE(irqs_disabled()) warning in
      local_bh_enable, resulting in this:
      
      WARNING: at kernel/softirq.c:159 local_bh_enable+0x59/0x90() (Not tainted)
      Hardware name: VMware Virtual Platform
      Modules linked in: ipv6 ppdev parport_pc parport microcode e1000 vmware_balloon
      vmxnet3 i2c_piix4 sg ext4 jbd2 mbcache sd_mod crc_t10dif sr_mod cdrom mptspi
      mptscsih mptbase scsi_transport_spi pata_acpi ata_generic ata_piix vmwgfx ttm
      drm_kms_helper drm i2c_core dm_mirror dm_region_hash dm_log dm_mod [last
      unloaded: mperf]
      Pid: 6229, comm: sshd Not tainted 2.6.32-616.el6.i686 #1
      Call Trace:
       [<c04624d9>] ? warn_slowpath_common+0x89/0xe0
       [<c0469e99>] ? local_bh_enable+0x59/0x90
       [<c046254b>] ? warn_slowpath_null+0x1b/0x20
       [<c0469e99>] ? local_bh_enable+0x59/0x90
       [<c07bb936>] ? skb_copy_bits+0x126/0x210
       [<f8d1d9fe>] ? ext4_ext_find_extent+0x24e/0x2d0 [ext4]
       [<c07bc49e>] ? __pskb_pull_tail+0x6e/0x2b0
       [<f95a6164>] ? vmxnet3_xmit_frame+0xba4/0xef0 [vmxnet3]
       [<c05d15a6>] ? selinux_ip_postroute+0x56/0x320
       [<c0615988>] ? cfq_add_rq_rb+0x98/0x110
       [<c0852df8>] ? packet_rcv+0x48/0x350
       [<c07c5839>] ? dev_queue_xmit_nit+0xc9/0x140
      ...
      
      Fix it by splitting vmxnet3_parse_and_copy_hdr into two functions:
      
      vmxnet3_parse_hdr, which sets up the internal/on stack ctx datastructure, and
      pulls the skb (both of which can be done without holding the spinlock with irqs
      disabled
      
      and
      
      vmxnet3_copy_header, which just copies the skb to the tx ring under the lock
      safely.
      
      tested and shown to correct the described problem.  Applies cleanly to the head
      of the net tree
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: Shrikrishna Khare <skhare@vmware.com>
      CC: "VMware, Inc." <pv-drivers@vmware.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Acked-by: NShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cec05562
    • D
      Merge tag 'wireless-drivers-for-davem-2016-03-04' of... · 7024b68e
      David S. Miller 提交于
      Merge tag 'wireless-drivers-for-davem-2016-03-04' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      wireless-drivers fixes for 4.5
      
      iwlwifi
      
      * free firmware paging memory when the module is unloaded or device removed
      * fix pending frames counter to fix an issue when removing stations
      
      ssb
      
      * fix a build problem related to ssb_fill_sprom_with_fallback()
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7024b68e
    • K
      net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM · 979d804e
      Krzysztof Kozlowski 提交于
      The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
      direct dependencies.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      979d804e
    • T
      ibmveth: check return of skb_linearize in ibmveth_start_xmit · 2c42bf4b
      Thomas Falcon 提交于
      If skb_linearize fails, the driver should drop the packet
      instead of trying to copy it into the bounce buffer.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c42bf4b
    • B
      cdc_ncm: toggle altsetting to force reset before setup · 48906f62
      Bjørn Mork 提交于
      Some devices will silently fail setup unless they are reset first.
      This is necessary even if the data interface is already in
      altsetting 0, which it will be when the device is probed for the
      first time.  Briefly toggling the altsetting forces a function
      reset regardless of the initial state.
      
      This fixes a setup problem observed on a number of Huawei devices,
      appearing to operate in NTB-32 mode even if we explicitly set them
      to NTB-16 mode.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48906f62
    • O
      usbnet: cleanup after bind() in probe() · 1666984c
      Oliver Neukum 提交于
      In case bind() works, but a later error forces bailing
      in probe() in error cases work and a timer may be scheduled.
      They must be killed. This fixes an error case related to
      the double free reported in
      http://www.spinics.net/lists/netdev/msg367669.html
      and needs to go on top of Linus' fix to cdc-ncm.
      Signed-off-by: NOliver Neukum <ONeukum@suse.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1666984c
    • D
      Merge branch 'mlxsw-fixes' · a383b7f0
      David S. Miller 提交于
      Jiri Pirko says:
      
      ====================
      mlxsw: couple of fixes
      
      Couple of fixes from Ido.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a383b7f0
    • I
      mlxsw: pci: Correctly determine if descriptor queue is full · 5091730d
      Ido Schimmel 提交于
      The descriptor queues for sending (SDQs) and receiving (RDQs) packets
      are managed by two counters - producer and consumer - which are both
      16-bit in size. A queue is considered full when the difference between
      the two equals the queue's maximum number of descriptors.
      
      However, if the producer counter overflows, then it's possible for the
      full queue check to fail, as it doesn't take the overflow into account.
      In such a case, descriptors already passed to the device - but for which
      a completion has yet to be posted - will be overwritten, thereby causing
      undefined behavior. The above can be achieved under heavy load (~30
      netperf instances).
      
      Fix that by casting the subtraction result to u16, preventing it from
      being treated as a signed integer.
      
      Fixes: eda6500a ("mlxsw: Add PCI bus implementation")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5091730d
    • I
      mlxsw: spectrum: Always decrement bridge's ref count · 912b1c89
      Ido Schimmel 提交于
      Since we only support one VLAN filtering bridge we need to associate a
      reference count with it, so that when the last port netdev leaves it, we
      would know that a different bridge can be offloaded to hardware.
      
      When a LAG device is memeber in a bridge and port netdevs are leaving
      the LAG, we should always decrement the bridge's reference count, as it's
      incremented for any port in the LAG.
      
      Fixes: 4dc236c3 ("mlxsw: spectrum: Handle port leaving LAG while bridged")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      912b1c89
  2. 07 3月, 2016 6 次提交
  3. 05 3月, 2016 1 次提交
  4. 04 3月, 2016 14 次提交
  5. 03 3月, 2016 10 次提交