1. 08 Mar, 2016 17 commits
  2. 07 Mar, 2016 23 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e2857b8f
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix ordering of WEXT netlink messages so we don't see a newlink
          after a dellink, from Johannes Berg.
      
       2) Out of bounds access in minstrel_ht_set_best_prob_rage, from
          Konstantin Khlebnikov.
      
       3) Paging buffer memory leak in iwlwifi, from Matti Gottlieb.
      
       4) Wrong units used to set initial TCP rto from cached metrics, also
          from Konstantin Khlebnikov.
      
       5) Fix stale IP options data in the SKB control block from leaking
          through layers of encapsulation, from Bernie Harris.
      
       6) Zero padding len miscalculated in bnxt_en, from Michael Chan.
      
       7) Only CHECKSUM_PARTIAL packets should be passed down through GSO, fix
          from Hannes Frederic Sowa.
      
       8) Fix suspend/resume with JME networking devices, from Diego Violat
          and Guo-Fu Tseng.
      
       9) Checksums not validated properly in bridge multicast support due to
          the placement of the SKB header pointers at the time of the check,
          fix from Álvaro Fernández Rojas.
      
      10) Fix hang/tiemout with r8169 if a stats fetch is done while the
          device is runtime suspended.  From Chun-Hao Lin.
      
      11) The forwarding database netlink dump facilities don't track the
          state of the dump properly, resulting in skipped/missed entries.
          From Minoura Makoto.
      
      12) Fix regression from a recent 3c59x bug fix, from Neil Horman.
      
      13) Fix list corruption in bna driver, from Ivan Vecera.
      
      14) Big endian machines crash on vlan add in bnx2x, fix from Michal
          Schmidt.
      
      15) Ethtool RSS configuration not propagated properly in mlx5 driver,
          from Tariq Toukan.
      
      16) Fix regression in PHY probing in stmmac driver, from Gabriel
          Fernandez.
      
      17) Fix SKB tailroom calculation in igmp/mld code, from Benjamin
          Poirier.
      
      18) A past change to skip empty routing headers in ipv6 extention header
          parsing accidently caused fragment headers to not be matched any
          longer.  Fix from Florian Westphal.
      
      19) eTSEC-106 erratum needs to be applied to more gianfar chips, from
          Atsushi Nemoto.
      
      20) Fix netdev reference after free via workqueues in usb networking
          drivers, from Oliver Neukum and Bjørn Mork.
      
      21) mdio->irq is now an array rather than a pointer to dynamic memory,
          but several drivers were still trying to free it :-/ Fixes from
          Colin Ian King.
      
      22) act_ipt iptables action forgets to set the family field, thus LOG
          netfilter targets don't work with it.  Fix from Phil Sutter.
      
      23) SKB leak in ibmveth when skb_linearize() fails, from Thomas Falcon.
      
      24) pskb_may_pull() cannot be called with interrupts disabled, fix code
          that tries to do this in vmxnet3 driver, from Neil Horman.
      
      25) be2net driver leaks iomap'd memory on removal, fix from Douglas
          Miller.
      
      26) Forgotton RTNL mutex unlock in ppp_create_interface() error paths,
          from Guillaume Nault.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (97 commits)
        ppp: release rtnl mutex when interface creation fails
        cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
        tcp: fix tcpi_segs_in after connection establishment
        net: hns: fix the bug about loopback
        jme: Fix device PM wakeup API usage
        jme: Do not enable NIC WoL functions on S0
        udp6: fix UDP/IPv6 encap resubmit path
        be2net: Don't leak iomapped memory on removal.
        vmxnet3: avoid calling pskb_may_pull with interrupts disabled
        net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM
        ibmveth: check return of skb_linearize in ibmveth_start_xmit
        cdc_ncm: toggle altsetting to force reset before setup
        usbnet: cleanup after bind() in probe()
        mlxsw: pci: Correctly determine if descriptor queue is full
        mlxsw: spectrum: Always decrement bridge's ref count
        tipc: fix nullptr crash during subscription cancel
        net: eth: altera: do not free array priv->mdio->irq
        net/ethoc: do not free array priv->mdio->irq
        net: sched: fix act_ipt for LOG target
        asix: do not free array priv->mdio->irq
        ...
      e2857b8f
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 01ffa3df
      Linus Torvalds authored
      Pull overlayfs fixes from Miklos Szeredi:
       "Overlayfs bug fixes.  All marked as -stable material"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: copy new uid/gid into overlayfs runtime inode
        ovl: ignore lower entries when checking purity of non-directory entries
        ovl: fix getcwd() failure after unsuccessful rmdir
        ovl: fix working on distributed fs as lower layer
      01ffa3df
    • Linus Torvalds's avatar
      Revert "drm/radeon: call hpd_irq_event on resume" · 256faedc
      Linus Torvalds authored
      This reverts commit dbb17a21.
      
      It turns out that commit can cause problems for systems with multiple
      GPUs, and causes X to hang on at least a HP Pavilion dv7 with hybrid
      graphics.
      
      This got noticed originally in 4.4.4, where this patch had already
      gotten back-ported, but 4.5-rc7 was verified to have the same problem.
      
      Alexander Deucher says:
       "It looks like you have a muxed system so I suspect what's happening is
        that one of the display is being reported as connected for both the
        IGP and the dGPU and then the desktop environment gets confused or
        there some sort problem in the detect functions since the mux is not
        switched to the dGPU.  I don't see an easy fix unless Dave has any
        ideas.  I'd say just revert for now"
      Reported-by: default avatarJörg-Volker Peetz <jvpeetz@web.de>
      Acked-by: default avatarAlexander Deucher <Alexander.Deucher@amd.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: stable@kernel.org  # wherever dbb17a21 got back-ported
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      256faedc
    • Guillaume Nault's avatar
      ppp: release rtnl mutex when interface creation fails · 6faac63a
      Guillaume Nault authored
      Add missing rtnl_unlock() in the error path of ppp_create_interface().
      
      Fixes: 58a89eca ("ppp: fix lockdep splat in ppp_dev_uninit()")
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6faac63a
    • Bjørn Mork's avatar
      cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind · 4d06dd53
      Bjørn Mork authored
      usbnet_link_change will call schedule_work and should be
      avoided if bind is failing. Otherwise we will end up with
      scheduled work referring to a netdev which has gone away.
      
      Instead of making the call conditional, we can just defer
      it to usbnet_probe, using the driver_info flag made for
      this purpose.
      
      Fixes: 8a34b0ae ("usbnet: cdc_ncm: apply usbnet_link_change")
      Reported-by: default avatarAndrey Konovalov <andreyknvl@gmail.com>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d06dd53
    • Eric Dumazet's avatar
      tcp: fix tcpi_segs_in after connection establishment · a9d99ce2
      Eric Dumazet authored
      If final packet (ACK) of 3WHS is lost, it appears we do not properly
      account the following incoming segment into tcpi_segs_in
      
      While we are at it, starts segs_in with one, to count the SYN packet.
      
      We do not yet count number of SYN we received for a request sock, we
      might add this someday.
      
      packetdrill script showing proper behavior after fix :
      
      // Tests tcpi_segs_in when 3rd packet (ACK) of 3WHS is lost
      0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
         +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
         +0 bind(3, ..., ...) = 0
         +0 listen(3, 1) = 0
      
         +0 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop>
         +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
      +.020 < P. 1:1001(1000) ack 1 win 32792
      
         +0 accept(3, ..., ...) = 4
      
      +.000 %{ assert tcpi_segs_in == 2, 'tcpi_segs_in=%d' % tcpi_segs_in }%
      
      Fixes: 2efd055c ("tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9d99ce2
    • yankejian's avatar
      net: hns: fix the bug about loopback · 68c222a6
      yankejian authored
      It will always be passed if the soc is tested the loopback cases. This
      patch will fix this bug.
      Signed-off-by: default avatarKejian Yan <yankejian@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68c222a6
    • Guo-Fu Tseng's avatar
      jme: Fix device PM wakeup API usage · 81422e67
      Guo-Fu Tseng authored
      According to Documentation/power/devices.txt
      
      The driver should not use device_set_wakeup_enable() which is the policy
      for user to decide.
      
      Using device_init_wakeup() to initialize dev->power.should_wakeup and
      dev->power.can_wakeup on driver initialization.
      
      And use device_may_wakeup() on suspend to decide if WoL function should
      be enabled on NIC.
      Reported-by: default avatarDiego Viola <diego.viola@gmail.com>
      Signed-off-by: default avatarGuo-Fu Tseng <cooldavid@cooldavid.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81422e67
    • Guo-Fu Tseng's avatar
      jme: Do not enable NIC WoL functions on S0 · 0772a99b
      Guo-Fu Tseng authored
      Otherwise it might be back on resume right after going to suspend in
      some hardware.
      Reported-by: default avatarDiego Viola <diego.viola@gmail.com>
      Signed-off-by: default avatarGuo-Fu Tseng <cooldavid@cooldavid.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0772a99b
    • Haiyang Zhang's avatar
      hv_netvsc: Move subchannel waiting to rndis_filter_device_remove() · d66ab514
      Haiyang Zhang authored
      During hot add, vmbus_device_register() is called from vmbus_onoffer(), on
      the same workqueue as the subchannel offer message work-queue, so
      subchannel offer won't be processed until the vmbus_device_register()/...
      /netvsc_probe() is done.
      Also, vmbus_device_register() is called with channel_mutex locked, which
      prevents subchannel processing too. So the "waiting for sub-channel
      processing" will not success in hot add case. But, in usual module loading,
      the netvsc_probe() is called from different code path, and doesn't fail.
      
      This patch resolves the deadlock during NIC hot-add, and speeds up NIC
      loading time.
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d66ab514
    • Bill Sommerfeld's avatar
      udp6: fix UDP/IPv6 encap resubmit path · 59dca1d8
      Bill Sommerfeld authored
      IPv4 interprets a negative return value from a protocol handler as a
      request to redispatch to a new protocol.  In contrast, IPv6 interprets a
      negative value as an error, and interprets a positive value as a request
      for redispatch.
      
      UDP for IPv6 was unaware of this difference.  Change __udp6_lib_rcv() to
      return a positive value for redispatch.  Note that the socket's
      encap_rcv hook still needs to return a negative value to request
      dispatch, and in the case of IPv6 packets, adjust IP6CB(skb)->nhoff to
      identify the byte containing the next protocol.
      Signed-off-by: default avatarBill Sommerfeld <wsommerfeld@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59dca1d8
    • Douglas Miller's avatar
      be2net: Don't leak iomapped memory on removal. · a69bf3c5
      Douglas Miller authored
      The adapter->pcicfg resource is either mapped via pci_iomap() or
      derived from adapter->db. During be_remove() this resource was ignored
      and so could remain mapped after remove.
      
      Add a flag to track whether adapter->pcicfg was mapped or not, then
      use that flag in be_unmap_pci_bars() to unmap if required.
      
      Fixes: 25848c90 ("use PCI MMIO read instead of config read for errors")
      Signed-off-by: default avatarDouglas Miller <dougmill@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a69bf3c5
    • Neil Horman's avatar
      vmxnet3: avoid calling pskb_may_pull with interrupts disabled · cec05562
      Neil Horman authored
      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: default avatarNeil 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: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cec05562
    • David S. Miller's avatar
      Merge branch 'qed_hw_gro' · ab825adb
      David S. Miller authored
      Manish Chopra says:
      
      ====================
      qed/qede: Add hardware GRO support
      
      This patch series enables hardware GRO and add support for handling
      HW aggregated TCP packets in driver receive flow by skipping
      software GRO handling in stack.
      
      Please consider applying this series to net-next.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab825adb
    • Manish Chopra's avatar
      qede: Add slowpath/fastpath support and enable hardware GRO · 55482edc
      Manish Chopra authored
      This patch configures hardware to use GRO and adds support
      for fastpath APIs to handle HW aggregated packets.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarManish Chopra <manish.chopra@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55482edc
    • Manish Chopra's avatar
      qed/qede: Add infrastructure support for hardware GRO · 088c8618
      Manish Chopra authored
      This patch adds mainly structures and APIs prototype changes
      in order to give support for qede slowpath/fastpath support
      for the same.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarManish Chopra <manish.chopra@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      088c8618
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-for-davem-2016-03-04' of... · 7024b68e
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      7024b68e
    • Richard Alpe's avatar
      tipc: move netlink policies to netlink.c · 49cc66ea
      Richard Alpe authored
      Make the c files less cluttered and enable netlink attributes to be
      shared between files.
      Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Acked-by: default avatarParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49cc66ea
    • Zhang Shengju's avatar
      arp: correct return value of arp_rcv · 8dfd329f
      Zhang Shengju authored
      Currently, arp_rcv() always return zero on a packet delivery upcall.
      
      To make its behavior more compliant with the way this API should be
      used, this patch changes this to let it return NET_RX_SUCCESS when the
      packet is proper handled, and NET_RX_DROP otherwise.
      
      v1->v2:
      If sanity check is failed, call kfree_skb() instead of consume_skb(), then
      return the correct return value.
      Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8dfd329f
    • Krzysztof Kozlowski's avatar
      net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM · 979d804e
      Krzysztof Kozlowski authored
      The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
      direct dependencies.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      979d804e
    • Thomas Falcon's avatar
      ibmveth: check return of skb_linearize in ibmveth_start_xmit · 2c42bf4b
      Thomas Falcon authored
      If skb_linearize fails, the driver should drop the packet
      instead of trying to copy it into the bounce buffer.
      Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c42bf4b
    • Bjørn Mork's avatar
      cdc_ncm: toggle altsetting to force reset before setup · 48906f62
      Bjørn Mork authored
      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: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48906f62
    • Oliver Neukum's avatar
      usbnet: cleanup after bind() in probe() · 1666984c
      Oliver Neukum authored
      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: default avatarOliver Neukum <ONeukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1666984c