]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink: add RCU in nfnetlink_rcv_msg()
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 18 Jul 2011 14:08:07 +0000 (16:08 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 18 Jul 2011 14:08:07 +0000 (16:08 +0200)
commitb020d7a93f3dfef741209b9f8528db377077db82
tree940d95c340df22db092062bdaea599e9afc4fcf9
parentee1c02ef3ce0266ff061e68fab834305ca2789a5
netfilter: nfnetlink: add RCU in nfnetlink_rcv_msg()

Goal of this patch is to permit nfnetlink providers not mandate
nfnl_mutex being held while nfnetlink_rcv_msg() calls them.

If struct nfnl_callback contains a non NULL call_rcu(), then
nfnetlink_rcv_msg() will use it instead of call() field, holding
rcu_read_lock instead of nfnl_mutex

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Florian Westphal <fw@strlen.de>
CC: Eric Leblond <eric@regit.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter/nfnetlink.h
net/netfilter/nfnetlink.c