From: Martin KaFai Lau <martin.lau@linux.dev>
To: Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
eric.dumazet@gmail.com, syzbot <syzkaller@googlegroups.com>,
John Fastabend <john.fastabend@gmail.com>,
Jakub Sitnicki <jakub@cloudflare.com>,
Paolo Abeni <pabeni@redhat.com>,
"David S . Miller" <davem@davemloft.net>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Subject: Re: [PATCH bpf] sock_map: add a cond_resched() in sock_hash_free()
Date: Fri, 6 Sep 2024 14:26:46 -0700 [thread overview]
Message-ID: <0467d279-e825-4c15-ac85-859fc6b95ee2@linux.dev> (raw)
In-Reply-To: <20240906154449.3742932-1-edumazet@google.com>
On 9/6/24 8:44 AM, Eric Dumazet wrote:
> 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>
> Cc: John Fastabend <john.fastabend@gmail.com>
> Cc: Jakub Sitnicki <jakub@cloudflare.com>
> ---
> net/core/sock_map.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/core/sock_map.c b/net/core/sock_map.c
> index d3dbb92153f2fe7f1ddc8e35b495533fbf60a8cb..724b6856fcc3e9fd51673d31927cfd52d5d7d0aa 100644
> --- a/net/core/sock_map.c
> +++ b/net/core/sock_map.c
> @@ -1183,6 +1183,7 @@ static void sock_hash_free(struct bpf_map *map)
> sock_put(elem->sk);
> sock_hash_free_elem(htab, elem);
> }
> + cond_resched();
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Jakub, may be you can directly take it to net tree ?
next prev parent reply other threads:[~2024-09-06 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 15:44 [PATCH bpf] sock_map: add a cond_resched() in sock_hash_free() Eric Dumazet
2024-09-06 21:26 ` Martin KaFai Lau [this message]
2024-09-06 21:32 ` John Fastabend
2024-09-11 20:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0467d279-e825-4c15-ac85-859fc6b95ee2@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzkaller@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).