]> git.baikalelectronics.ru Git - kernel.git/commit
netns: don't disable BHs when locking "nsid_lock"
authorGuillaume Nault <gnault@redhat.com>
Mon, 13 Jan 2020 21:39:23 +0000 (22:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jan 2020 19:28:40 +0000 (11:28 -0800)
commit1f24bee2aeba00bf073554f07aca8a72284dd3f1
tree0f98073e97662ebd7ed7fee89403dbaa8bae13a9
parentedd3a10d0875b9a2708498baf6116aab1e815d9b
netns: don't disable BHs when locking "nsid_lock"

When peernet2id() had to lock "nsid_lock" before iterating through the
nsid table, we had to disable BHs, because VXLAN can call peernet2id()
from the xmit path:
  vxlan_xmit() -> vxlan_fdb_miss() -> vxlan_fdb_notify()
    -> __vxlan_fdb_notify() -> vxlan_fdb_info() -> peernet2id().

Now that peernet2id() uses RCU protection, "nsid_lock" isn't used in BH
context anymore. Therefore, we can safely use plain
spin_lock()/spin_unlock() and let BHs run when holding "nsid_lock".

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c