Skip to content
  1. Jun 09, 2015
    • Josh Hunt's avatar
      ipv6: Fix protocol resubmission · 0243508e
      Josh Hunt authored
      
      
      UDP encapsulation is broken on IPv6. This is because the logic to resubmit
      the nexthdr is inverted, checking for a ret value > 0 instead of < 0. Also,
      the resubmit label is in the wrong position since we already get the
      nexthdr value when performing decapsulation. In addition the skb pull is no
      longer necessary either.
      
      This changes the return value check to look for < 0, using it for the
      nexthdr on the next iteration, and moves the resubmit label to the proper
      location.
      
      With these changes the v6 code now matches what we do in the v4 ip input
      code wrt resubmitting when decapsulating.
      
      Signed-off-by: default avatarJosh Hunt <johunt@akamai.com>
      Acked-by: default avatar"Tom Herbert" <tom@herbertland.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0243508e
    • Robert Shearman's avatar
      ipv6: fix possible use after free of dev stats · 27e41fcf
      Robert Shearman authored
      
      
      The memory pointed to by idev->stats.icmpv6msgdev,
      idev->stats.icmpv6dev and idev->stats.ipv6 can each be used in an RCU
      read context without taking a reference on idev. For example, through
      IP6_*_STATS_* calls in ip6_rcv. These memory blocks are freed without
      waiting for an RCU grace period to elapse. This could lead to the
      memory being written to after it has been freed.
      
      Fix this by using call_rcu to free the memory used for stats, as well
      as idev after an RCU grace period has elapsed.
      
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27e41fcf
  2. Jun 08, 2015
  3. Jun 07, 2015
  4. Jun 06, 2015
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue · c6271b76
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-06-04
      
      This series contains updates to i40e and i40evf.
      
      Anjali provides three fixes, first to resolve a Tx queue hang if mixed
      size frags are passed to the driver while using TSO.  There was a corner
      case where we needed to linearize but we were not.  Next fixes a bug in
      the default configuration which prevented a software bridge loaded on the
      PF interface from working correctly because broadcast packets are
      incorrectly looped back.  Lastly fixes an NPAR bug when SRIOV is enabled,
      where we need to be in VEB mode, not VEPA mode at probe.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6271b76
  5. Jun 05, 2015
    • Anjali Singhai Jain's avatar
      i40e: Make sure to be in VEB mode if SRIOV is enabled at probe · fa11cb3d
      Anjali Singhai Jain authored
      
      
      If SRIOV is enabled we need to be in VEB mode not VEPA mode at probe.
      This fixes an NPAR bug when SRIOV is enabled in the BIOS.
      
      Change-ID: Ibf006abafd9a0ca3698ec24848cd771cf345cbbc
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fa11cb3d
    • Anjali Singhai Jain's avatar
      i40e: start up in VEPA mode by default · fc60861e
      Anjali Singhai Jain authored
      
      
      The patch fixes a bug in the default configuration which
      prevented a software bridge loaded on the PF interface from
      working correctly because broadcast packets are incorrectly
      looped back.
      
      Fix the general case, by loading the driver in VEPA mode Until a
      VF or VMDq VSI is added. This way loopback on the Main VSI is
      turned off until needed and can resolve the issue of unnecessary
      reflection for users that do not have VF or VMDq VSIs setup.
      
      The driver must now coordinate the loopback setting for the Flow
      Director (FDIR) VSI to make sure it is in sync with the current
      VEB or VEPA mode setting.
      
      The user can still switch bridge modes from the bridge commands and
      choose to be in VEPA mode with VF VSIs. Because of hardware
      requirements, the call to switch to VEB mode when no VF/VMDqs are
      present will be rejected.
      
      NOTE: This patch uses BIT_ULL as that is preferred going forward,
      a followup patch in the lower priority queue to net-next will fix
      up the remaining 1 << usages.
      
      Change-ID: Ib121ddb18fe4b3c4f52e9deda6fcbeb9105683d1
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fc60861e
    • Anjali Singhai Jain's avatar
      i40e/i40evf: Fix mixed size frags and linearization · 30520831
      Anjali Singhai Jain authored
      
      
      This patch fixes a bug where the i40e Tx queue will hang if this
      skb is passed to the driver.
      
      With mixed size fragments while using TSO there was a corner case
      where we needed to linearize but we were not. This was seen with
      iSCSI traffic and could be reproduced with a frag list that looks
      like this:
      
      num_frags = 17, gso_segs = 17, hdr_len = 66,
      skb_shinfo(skb)->gso_size = 1448
      size = 3002, j = 1, frag_size = 2936, num_frags = 17
      size = 4268, j = 1, frag_size = 4096, num_frags = 16
      size = 5534, j = 1, frag_size = 4096, num_frags = 15
      size = 5352, j = 1, frag_size = 4096, num_frags = 14
      size = 5170, j = 1, frag_size = 4096, num_frags = 13
      size = 3468, j = 1, frag_size = 2576, num_frags = 12
      size = 750, j = 1, frag_size = 112, num_frags = 11
      size = 862, j = 2, frag_size = 112, num_frags = 10
      size = 974, j = 3, frag_size = 112, num_frags = 9
      size = 1126, j = 4, frag_size = 152, num_frags = 8
      size = 1330, j = 5, frag_size = 204, num_frags = 7
      size = 1534, j = 6, frag_size = 204, num_frags = 6
      size = 356, j = 1, frag_size = 204, num_frags = 5
      size = 560, j = 2, frag_size = 204, num_frags = 4
      size = 764, j = 3, frag_size = 204, num_frags = 3
      size = 968, j = 4, frag_size = 204, num_frags = 2
      size = 1140, j = 5, frag_size = 172, num_frags = 1
      result: linearize = 0, j = 6
      
      Change-ID: I79bb1aeab0af255fe2ce28e93672a85d85bf47e8
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      30520831
  6. Jun 04, 2015
  7. Jun 02, 2015
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · c46a024e
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Various VTI tunnel (mark handling, PMTU) bug fixes from Alexander
          Duyck and Steffen Klassert.
      
       2) Revert ethtool PHY query change, it wasn't correct.  The PHY address
          selected by the driver running the PHY to MAC connection decides
          what PHY address GET ethtool operations return information from.
      
       3) Fix handling of sequence number bits for encryption IV generation in
          ESP driver, from Herbert Xu.
      
       4) UDP can return -EAGAIN when we hit a bad checksum on receive, even
          when there are other packets in the receive queue which is wrong.
          Just respect the error returned from the generic socket recv
          datagram helper.  From Eric Dumazet.
      
       5) Fix BNA driver firmware loading on big-endian systems, from Ivan
          Vecera.
      
       6) Fix regression in that we were inheriting the congestion control of
          the listening socket for new connections, the intended behavior
          always was to use the default in this case.  From Neal Cardwell.
      
       7) Fix NULL deref in brcmfmac driver, from Arend van Spriel.
      
       8) OTP parsing fix in iwlwifi from Liad Kaufman.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits)
        vti6: Add pmtu handling to vti6_xmit.
        Revert "net: core: 'ethtool' issue with querying phy settings"
        bnx2x: Move statistics implementation into semaphores
        xen: netback: read hotplug script once at start of day.
        xen: netback: fix printf format string warning
        Revert "netfilter: ensure number of counters is >0 in do_replace()"
        net: dsa: Properly propagate errors from dsa_switch_setup_one
        tcp: fix child sockets to use system default congestion control if not set
        udp: fix behavior of wrong checksums
        sfc: free multiple Rx buffers when required
        bna: fix soft lock-up during firmware initialization failure
        bna: remove unreasonable iocpf timer start
        bna: fix firmware loading on big-endian machines
        bridge: fix br_multicast_query_expired() bug
        via-rhine: Resigning as maintainer
        brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails
        mac80211: Fix mac80211.h docbook comments
        iwlwifi: nvm: fix otp parsing in 8000 hw family
        iwlwifi: pcie: fix tracking of cmd_in_flight
        ip_vti/ip6_vti: Preserve skb->mark after rcv_cb call
        ...
      c46a024e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 2459c609
      Linus Torvalds authored
      Pull Sparc fixes from David Miller:
      
       1) Setup the core/threads/sockets bitmaps correctly so that 'lscpus'
          and friends operate properly.  Frtom Chris Hyser.
      
       2) The bit that normally means "Cached Virtually" on sun4v systems,
          actually changes meaning in M7 and later chips.  Fix from Khalid
          Aziz.
      
       3) One some PCI-E systems we need to probe different OF properties to
          fill in the PCI slot information properly, from Eric Snowberg.
      
       4) Kill an extraneous memset after kzalloc(), from Christophe Jaillet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: Resolve conflict between sparc v9 and M7 on usage of bit 9 of TTE
        sparc64: pci slots information is not populated in sysfs
        sparc: kernel: GRPCI2: Remove a useless memset
        sparc64: Setup sysfs to mark LDOM sockets, cores and threads correctly
      2459c609
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · fec345ba
      Linus Torvalds authored
      Pull virtio fix from Michael Tsirkin:
       "Last-minute virtio fix for 4.1
      
        This tweaks an exported user-space header to fix build breakage for
        userspace using it"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        include/uapi/linux/virtio_balloon.h: include linux/virtio_types.h
      fec345ba
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · e453581d
      David S. Miller authored
      
      
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fix for net
      
      The following patch reverts the ebtables chunk that enforces counters that was
      introduced in the recently applied d26e2c9f ('Revert "netfilter: ensure
      number of counters is >0 in do_replace()"') since this breaks ebtables.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e453581d
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-for-davem-2015-06-01' of... · cd842a67
      David S. Miller authored
      Merge tag 'wireless-drivers-for-davem-2015-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      
      
      Kalle Valo says:
      
      ====================
      iwlwifi:
      
      * fix OTP parsing 8260
      * fix powersave handling for 8260
      
      brcmfmac:
      
      * fix null pointer crash
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd842a67
    • Steffen Klassert's avatar
      vti6: Add pmtu handling to vti6_xmit. · ccd740cb
      Steffen Klassert authored
      
      
      We currently rely on the PMTU discovery of xfrm.
      However if a packet is localy sent, the PMTU mechanism
      of xfrm tries to to local socket notification what
      might not work for applications like ping that don't
      check for this. So add pmtu handling to vti6_xmit to
      report MTU changes immediately.
      
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ccd740cb
    • David S. Miller's avatar
      Revert "net: core: 'ethtool' issue with querying phy settings" · 18ec898e
      David S. Miller authored
      
      
      This reverts commit f96dee13.
      
      It isn't right, ethtool is meant to manage one PHY instance
      per netdevice at a time, and this is selected by the SET
      command.  Therefore by definition the GET command must only
      return the settings for the configured and selected PHY.
      
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18ec898e
    • Yuval Mintz's avatar
      bnx2x: Move statistics implementation into semaphores · c6e36d8c
      Yuval Mintz authored
      
      
      Commit dff173de ("bnx2x: Fix statistics locking scheme") changed the
      bnx2x locking around statistics state into using a mutex - but the lock
      is being accessed via a timer which is forbidden.
      
      [If compiled with CONFIG_DEBUG_MUTEXES, logs show a warning about
      accessing the mutex in interrupt context]
      
      This moves the implementation into using a semaphore [with size '1']
      instead.
      
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6e36d8c
    • Ian Campbell's avatar
      xen: netback: read hotplug script once at start of day. · 31a41898
      Ian Campbell authored
      
      
      When we come to tear things down in netback_remove() and generate the
      uevent it is possible that the xenstore directory has already been
      removed (details below).
      
      In such cases netback_uevent() won't be able to read the hotplug
      script and will write a xenstore error node.
      
      A recent change to the hypervisor exposed this race such that we now
      sometimes lose it (where apparently we didn't ever before).
      
      Instead read the hotplug script configuration during setup and use it
      for the lifetime of the backend device.
      
      The apparently more obvious fix of moving the transition to
      state=Closed in netback_remove() to after the uevent does not work
      because it is possible that we are already in state=Closed (in
      reaction to the guest having disconnected as it shutdown). Being
      already in Closed means the toolstack is at liberty to start tearing
      down the xenstore directories. In principal it might be possible to
      arrange to unregister the device sooner (e.g on transition to Closing)
      such that xenstore would still be there but this state machine is
      fragile and prone to anger...
      
      A modern Xen system only relies on the hotplug uevent for driver
      domains, when the backend is in the same domain as the toolstack it
      will run the necessary setup/teardown directly in the correct sequence
      wrt xenstore changes.
      
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31a41898
    • Ian Campbell's avatar
      xen: netback: fix printf format string warning · dc5e7a81
      Ian Campbell authored
      
      
      drivers/net/xen-netback/netback.c: In function ‘xenvif_tx_build_gops’:
      drivers/net/xen-netback/netback.c:1253:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=]
              (txreq.offset&~PAGE_MASK) + txreq.size);
              ^
      
      PAGE_MASK's type can vary by arch, so a cast is needed.
      
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      ----
      v2: Cast to unsigned long, since PAGE_MASK can vary by arch.
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc5e7a81
    • Bernhard Thaler's avatar
      Revert "netfilter: ensure number of counters is >0 in do_replace()" · d26e2c9f
      Bernhard Thaler authored
      
      
      This partially reverts commit 1086bbe9 ("netfilter: ensure number of
      counters is >0 in do_replace()") in net/bridge/netfilter/ebtables.c.
      
      Setting rules with ebtables does not work any more with 1086bbe9 place.
      
      There is an error message and no rules set in the end.
      
      e.g.
      
      ~# ebtables -t nat -A POSTROUTING --src 12:34:56:78:9a:bc -j DROP
      Unable to update the kernel. Two possible causes:
      1. Multiple ebtables programs were executing simultaneously. The ebtables
         userspace tool doesn't by default support multiple ebtables programs
      running
      
      Reverting the ebtables part of 1086bbe9 makes this work again.
      
      Signed-off-by: default avatarBernhard Thaler <bernhard.thaler@wvnet.at>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      d26e2c9f
  8. Jun 01, 2015