From: Hillf Danton <hdanton@sina.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Eric Dumazet <edumazet@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
bpf <bpf@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bpf, sockmap: defer sk_psock_free_link() using RCU
Date: Wed, 22 May 2024 06:59:18 +0800 [thread overview]
Message-ID: <20240521225918.2147-1-hdanton@sina.com> (raw)
In-Reply-To: <CAADnVQKuPJv-GNH9SAWL-esSERMXJmSamWRe7AG3cW=NTnf51w@mail.gmail.com>
On Tue, 21 May 2024 08:38:52 -0700 Alexei Starovoitov <alexei.starovoitov@gmail.com>
> On Sun, May 12, 2024 at 12:22=E2=80=AFAM Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> > --- a/net/core/sock_map.c
> > +++ b/net/core/sock_map.c
> > @@ -142,6 +142,7 @@ static void sock_map_del_link(struct sock *sk,
> > bool strp_stop =3D false, verdict_stop =3D false;
> > struct sk_psock_link *link, *tmp;
> >
> > + rcu_read_lock();
> > spin_lock_bh(&psock->link_lock);
>
> I think this is incorrect.
> spin_lock_bh may sleep in RT and it won't be safe to do in rcu cs.
Could you specify why it won't be safe in rcu cs if you are right?
What does rcu look like in RT if not nothing?
>
> pw-bot: cr
next prev parent reply other threads:[~2024-05-21 23:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 7:21 [PATCH] bpf, sockmap: defer sk_psock_free_link() using RCU Tetsuo Handa
2024-05-21 15:38 ` Alexei Starovoitov
2024-05-21 22:59 ` Hillf Danton [this message]
2024-05-22 9:50 ` Jakub Sitnicki
2024-05-22 10:30 ` Tetsuo Handa
2024-05-22 11:08 ` Jakub Sitnicki
2024-05-22 11:33 ` Hillf Danton
2024-05-22 12:12 ` Jakub Sitnicki
2024-05-22 14:57 ` Alexei Starovoitov
2024-05-24 13:06 ` Jakub Sitnicki
2024-05-27 11:22 ` Jakub Sitnicki
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=20240521225918.2147-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=torvalds@linux-foundation.org \
/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