Skip to content
Commit 7dc68e98 authored by Cong Wang's avatar Cong Wang Committed by Pablo Neira Ayuso
Browse files

netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert



rateest_hash is supposed to be protected by xt_rateest_mutex,
and, as suggested by Eric, lookup and insert should be atomic,
so we should acquire the xt_rateest_mutex once for both.

So introduce a non-locking helper for internal use and keep the
locking one for external.

Reported-by: default avatar <syzbot+5cb189720978275e4c75@syzkaller.appspotmail.com>
Fixes: 5859034d ("[NETFILTER]: x_tables: add RATEEST target")
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 992cfc7c
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