summaryrefslogtreecommitdiff
path: root/mm/zpool.c
diff options
context:
space:
mode:
authorGuillaume Nault <gnault@redhat.com>2020-01-14 00:39:22 +0300
committerDavid S. Miller <davem@davemloft.net>2020-01-14 22:28:40 +0300
commit2dce224f469f060b9998a5a869151ef83c08ce77 (patch)
tree2d192faaecde1c8af7bd6e8be08d69951735be35 /mm/zpool.c
parent4905294162bda43bef65b411cf791005c7e15b28 (diff)
downloadlinux-2dce224f469f060b9998a5a869151ef83c08ce77.tar.xz
netns: protect netns ID lookups with RCU
__peernet2id() can be protected by RCU as it only calls idr_for_each(), which is RCU-safe, and never modifies the nsid table. rtnl_net_dumpid() can also do lockless lookups. It does two nested idr_for_each() calls on nsid tables (one direct call and one indirect call because of rtnl_net_dumpid_one() calling __peernet2id()). The netnsid tables are never updated. Therefore it is safe to not take the nsid_lock and run within an RCU-critical section instead. Signed-off-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/zpool.c')
0 files changed, 0 insertions, 0 deletions