]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: safe RCU iteration on list when dumping
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 1 Jul 2014 09:49:18 +0000 (11:49 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Jul 2014 09:20:45 +0000 (11:20 +0200)
commitc8036d9c46aed8d1309fd8e416836806489886d1
tree192a76d6a42b42d039b9def5b10ede0d02c3cbf4
parent2434e6fd4653b236979c769800f26d5c9a153702
netfilter: nf_tables: safe RCU iteration on list when dumping

The dump operation through netlink is not protected by the nfnl_lock.
Thus, a reader process can be dumping any of the existing object
lists while another process can be updating the list content.

This patch resolves this situation by protecting all the object
lists with RCU in the netlink dump path which is the reader side.
The updater path is already protected via nfnl_lock, so use list
manipulation RCU-safe operations.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c