]> 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)
commit28f460eb5b84f31b1c8c02ac32ae0b56a3450dab
tree192a76d6a42b42d039b9def5b10ede0d02c3cbf4
parentee46b436b210f8e6f4bb27310448f9b91650f232
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