]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sock_map: Add a cond_resched() in sock_hash_free()
authorEric Dumazet <edumazet@google.com>
Fri, 6 Sep 2024 15:44:49 +0000 (15:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:46 +0000 (15:10 +0200)
commit984648aac87a6a1c8fd61663bec3f7b61eafad5e
tree859312f86f0c214e803da2ce1eee5cad2666380d
parentbf090f4fe935294361eabd9dc5a949fdd77d3d1b
sock_map: Add a cond_resched() in sock_hash_free()

[ Upstream commit b1339be951ad31947ae19bc25cb08769bf255100 ]

Several syzbot soft lockup reports all have in common sock_hash_free()

If a map with a large number of buckets is destroyed, we need to yield
the cpu when needed.

Fixes: 75e68e5bf2c7 ("bpf, sockhash: Synchronize delete from bucket list on map free")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20240906154449.3742932-1-edumazet@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/sock_map.c