From: Pablo Neira Ayuso Date: Sat, 25 Jan 2014 13:03:51 +0000 (+0100) Subject: netfilter: nf_tables: fix racy rule deletion X-Git-Tag: v3.14-rc3~36^2~28^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0165d9325d6a3cf856e2cbbe64a0f4635ac75893;p=pandora-kernel.git 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 Reported-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- Reading git-diff-tree failed