From: Muchun Song <songmuchun@bytedance.com>
To: Song Liu <song@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [External] Re: [RFC PATCH] bpf: Fix potential call bpf_link_free() in atomic context
Date: Sat, 19 Sep 2020 13:26:53 +0800 [thread overview]
Message-ID: <CAMZfGtWVgZ9CojskbN5bnex-z4=NLux0BrODVk6eG+=kfYjfBw@mail.gmail.com> (raw)
In-Reply-To: <CAPhsuW7W0Cm_eyEY8pDGwMqo8pM3OWAUYUu8PyUqcUxPGLX3DA@mail.gmail.com>
On Fri, Sep 18, 2020 at 6:37 AM Song Liu <song@kernel.org> wrote:
>
> On Thu, Sep 17, 2020 at 12:46 AM Muchun Song <songmuchun@bytedance.com> wrote:
> >
> > The in_atomic macro cannot always detect atomic context. In particular,
> > it cannot know about held spinlocks in non-preemptible kernels. Although,
> > there is no user call bpf_link_put() with holding spinlock now. Be the
> > safe side, we can avoid this in the feature.
> >
> > Signed-off-by: Muchun Song <songmuchun@bytedance.com>
>
> Acked-by: Song Liu <songliubraving@fb.com>
>
> This is a little weird, but I guess that is OK, as bpf_link_put() is
> not in the critical
Yeah, bpf_link_put() is OK now because there is no user call it
with a holding spinlock.
> path. Is the plan to eliminate in_atomic() (as much as possible)?
Most other users of in_atomic() just for WARN_ON. It seems
there is no problem :).
--
Yours,
Muchun
next prev parent reply other threads:[~2020-09-19 5:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 7:44 [RFC PATCH] bpf: Fix potential call bpf_link_free() in atomic context Muchun Song
2020-09-17 22:37 ` Song Liu
2020-09-19 5:26 ` Muchun Song [this message]
2020-09-21 17:29 ` Andrii Nakryiko
2020-09-21 18:31 ` Andrii Nakryiko
2020-09-21 19:27 ` Daniel Borkmann
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='CAMZfGtWVgZ9CojskbN5bnex-z4=NLux0BrODVk6eG+=kfYjfBw@mail.gmail.com' \
--to=songmuchun@bytedance.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=song@kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.