netfilter: nf_tables: flow event notifier must use transaction mutex

Fixes: f102d66b33 ("netfilter: nf_tables: use dedicated mutex to guard transactions")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Florian Westphal 2018-07-31 17:24:45 +02:00 committed by Pablo Neira Ayuso
parent ddba40be59
commit 9e619d87b2

View file

@ -5940,13 +5940,13 @@ static int nf_tables_flowtable_event(struct notifier_block *this,
if (!net)
return 0;
nfnl_lock(NFNL_SUBSYS_NFTABLES);
mutex_lock(&net->nft.commit_mutex);
list_for_each_entry(table, &net->nft.tables, list) {
list_for_each_entry(flowtable, &table->flowtables, list) {
nft_flowtable_event(event, dev, flowtable);
}
}
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
mutex_unlock(&net->nft.commit_mutex);
put_net(net);
return NOTIFY_DONE;
}