Commit 5bc5c307 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nf_tables: use RCU-safe list insertion when replacing rules

The patch 5e948466 ("netfilter: nf_tables: add insert operation") did
not include RCU-safe list insertion when replacing rules.
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent cd5f336f
......@@ -1796,7 +1796,7 @@ static int nf_tables_newrule(struct sock *nlsk, struct sk_buff *skb,
goto err2;
}
nft_rule_disactivate_next(net, old_rule);
list_add_tail(&rule->list, &old_rule->list);
list_add_tail_rcu(&rule->list, &old_rule->list);
} else {
err = -ENOENT;
goto err2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment