mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
netfilter: xt_hashlimit: fix lock imbalance
syszkaller found that rcu was not held in hashlimit_mt_common() We only need to enable BH at this point. Fixes: bea74641e378 ("netfilter: xt_hashlimit: add rate match mode") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: syzkaller <syzkaller@googlegroups.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
db57ccf0f2
commit
de526f4012
@ -775,7 +775,7 @@ hashlimit_mt_common(const struct sk_buff *skb, struct xt_action_param *par,
|
||||
if (!dh->rateinfo.prev_window &&
|
||||
(dh->rateinfo.current_rate <= dh->rateinfo.burst)) {
|
||||
spin_unlock(&dh->lock);
|
||||
rcu_read_unlock_bh();
|
||||
local_bh_enable();
|
||||
return !(cfg->mode & XT_HASHLIMIT_INVERT);
|
||||
} else {
|
||||
goto overlimit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user