1. 23 Jan, 2014 7 commits
    • Christoph Paasch's avatar
      tcp: metrics: Fix rcu-race when deleting multiple entries · 00ca9c5b
      Christoph Paasch authored
      In bbf852b9 I introduced the tmlist, which allows to delete
      multiple entries from the cache that match a specified destination if no
      source-IP is specified.
      
      However, as the cache is an RCU-list, we should not create this tmlist, as
      it will change the tcpm_next pointer of the element that will be deleted
      and so a thread iterating over the cache's entries while holding the
      RCU-lock might get "redirected" to this tmlist.
      
      This patch fixes this, by reverting back to the old behavior prior to
      bbf852b9, which means that we simply change the tcpm_next
      pointer of the previous element (pp) to jump over the one we are
      deleting.
      The difference is that we call kfree_rcu() directly on the cache entry,
      which allows us to delete multiple entries from the list.
      
      Fixes: bbf852b9 (tcp: metrics: Delete all entries matching a certain destination)
      Signed-off-by: default avatarChristoph Paasch <christoph.paasch@uclouvain.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00ca9c5b
    • David S. Miller's avatar
      Merge branch 'bonding' · 7705b104
      David S. Miller authored
      Ding Tianhong says:
      
      ====================
      bonding: fix primary problem for bonding
      
      If the slave's name changed, and the bond params primary is exist,
      the bond should deal with the situation in two ways:
      
      1) If the slave was the primary slave yet, clean the primary slave
         and reselect active slave.
      2) If the slave's new name is as same as bond primary, set the slave
         as primary slave and reselect active slave.
      
      If the new primary is not matching any slave in the bond, the bond should
      record it to params, clean the primary slave and select a new active slave.
      
      Update bonding.txt for primary description.
      
      v2.1->v1: Because there are too many indentions and useless verification, so rewrite
      	  the logic for updating the primary slave.
      	  Modify some comments for to clean the typos.
      
      v3->v2.1: Veaceslav disagree the first patch and modify the logic for it
      	  (bonding: update the primary slave when changing slave's name)
      	  and resend it himself (bonding: handle slave's name change with primary_slave logic),
      	  so remove the first patch and send the last two patches.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7705b104
    • dingtianhong's avatar
    • dingtianhong's avatar
      bonding: clean the primary slave if there is no slave matching new primary · c59ab673
      dingtianhong authored
      If the new primay is not matching any slave in the bond, the bond should
      record it to params, clean the primary slave and select a new active slave.
      Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c59ab673
    • Daniel Borkmann's avatar
      net: vxlan: convert to act as a pernet subsystem · 783c1463
      Daniel Borkmann authored
      As per suggestion from Eric W. Biederman, vxlan should be using
      {un,}register_pernet_subsys() instead of {un,}register_pernet_device()
      to ensure the vxlan_net structure is initialized before and cleaned
      up after all network devices in a given network namespace i.e. when
      dealing with network notifiers. This is similarly handeled already in
      commit 91e2ff35 ("net: Teach vlans to cleanup as a pernet subsystem")
      and, thus, improves upon fd27e0d4 ("net: vxlan: do not use vxlan_net
      before checking event type"). Just as in 91e2ff35, we do not need
      to explicitly handle deletion of vxlan devices as network namespace
      exit calls dellink on all remaining virtual devices, and
      rtnl_link_unregister() calls dellink on all outstanding devices in that
      network namespace, so we can entirely drop the pernet exit operation
      as well. Moreover, on vxlan module exit, rcu_barrier() is called by
      netns since commit 3a765eda ("netns: Add an explicit rcu_barrier
      to unregister_pernet_{device|subsys}"), so this may be omitted. Tested
      with various scenarios and works well on my side.
      Suggested-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      783c1463
    • Harry Mason's avatar
      sch_htb: let skb->priority refer to non-leaf class · 29824310
      Harry Mason authored
      If the class in skb->priority is not a leaf, apply filters from the
      selected class, not the qdisc. This lets netfilter or user space
      partially classify the packet.
      Signed-off-by: default avatarHarry Mason <harry.mason@smoothwall.net>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29824310
    • Neil Horman's avatar
      af_packet: Add Queue mapping mode to af_packet fanout operation · 2d36097d
      Neil Horman authored
      This patch adds a queue mapping mode to the fanout operation of af_packet
      sockets.  This allows user space af_packet users to better filter on flows
      ingressing and egressing via a specific hardware queue, and avoids the potential
      packet reordering that can occur when FANOUT_CPU is being used and irq affinity
      varies.
      
      Tested successfully by myself.  applies to net-next
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2d36097d
  2. 22 Jan, 2014 33 commits