]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_rbtree: fix locking
authorPatrick McHardy <kaber@trash.net>
Sat, 21 Mar 2015 15:19:14 +0000 (15:19 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 22 Mar 2015 18:49:09 +0000 (19:49 +0100)
commit0296873907fee7c826df50d7c83e7fe7cfb785fb
treef1d41d0ce185c7cbf77dbead62accfe39620419b
parentffb5152fe31d35fcac3ceb3d5f0a04004d0d559e
netfilter: nft_rbtree: fix locking

Fix a race condition and unnecessary locking:

* the root rb_node must only be accessed under the lock in nft_rbtree_lookup()
* the lock is not needed in lookup functions in netlink context

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_rbtree.c