summaryrefslogtreecommitdiffstats
path: root/block/ioctl.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso2014-01-25 14:03:51 +0100
committerPablo Neira Ayuso2014-02-06 11:46:06 +0100
commit0165d9325d6a3cf856e2cbbe64a0f4635ac75893 (patch)
tree0e33bf5e9bac4ac772b45d41899ca16024c2ff7e /block/ioctl.c
parentnetfilter: nf_tables: fix log/queue expressions for NFPROTO_INET (diff)
downloadkernel-qcow2-linux-0165d9325d6a3cf856e2cbbe64a0f4635ac75893.tar.gz
kernel-qcow2-linux-0165d9325d6a3cf856e2cbbe64a0f4635ac75893.tar.xz
kernel-qcow2-linux-0165d9325d6a3cf856e2cbbe64a0f4635ac75893.zip
netfilter: nf_tables: fix racy rule deletion
We may lost race if we flush the rule-set (which happens asynchronously via call_rcu) and we try to remove the table (that userspace assumes to be empty). Fix this by recovering synchronous rule and chain deletion. This was introduced time ago before we had no batch support, and synchronous rule deletion performance was not good. Now that we have the batch support, we can just postpone the purge of old rule in a second step in the commit phase. All object deletions are synchronous after this patch. As a side effect, we save memory as we don't need rcu_head per rule anymore. Cc: Patrick McHardy <kaber@trash.net> Reported-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'block/ioctl.c')
0 files changed, 0 insertions, 0 deletions