mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment()
[ Upstream commit 17b8b74c0f
]
The function is called when rcu_read_lock() is held and not
when rcu_read_lock_bh() is held.
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
28bd72a726
commit
79f2eb5fde
1 changed files with 2 additions and 2 deletions
|
@ -43,11 +43,11 @@ ip_set_init_comment(struct ip_set *set, struct ip_set_comment *comment,
|
|||
rcu_assign_pointer(comment->c, c);
|
||||
}
|
||||
|
||||
/* Used only when dumping a set, protected by rcu_read_lock_bh() */
|
||||
/* Used only when dumping a set, protected by rcu_read_lock() */
|
||||
static inline int
|
||||
ip_set_put_comment(struct sk_buff *skb, const struct ip_set_comment *comment)
|
||||
{
|
||||
struct ip_set_comment_rcu *c = rcu_dereference_bh(comment->c);
|
||||
struct ip_set_comment_rcu *c = rcu_dereference(comment->c);
|
||||
|
||||
if (!c)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue