From: Stanislav Fomichev <sdf@fomichev.me>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Stanislav Fomichev <sdf@google.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
ast@kernel.org, daniel@iogearbox.net,
quentin.monnet@netronome.com
Subject: Re: [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type
Date: Tue, 23 Apr 2019 17:12:06 -0700 [thread overview]
Message-ID: <20190424001206.GA1247@mini-arch> (raw)
In-Reply-To: <20190423162855.4580667d@cakuba.netronome.com>
On 04/23, Jakub Kicinski wrote:
> On Tue, 23 Apr 2019 16:21:59 -0700, Stanislav Fomichev wrote:
> > + rcu_read_lock();
> > + attached = rcu_dereference(net->flow_dissector_prog);
> > + if (attached) {
> > + cnt = 1;
> > + if (prog_ids &&
> > + copy_to_user(prog_ids, &attached->aux->id, sizeof(u32))) {
>
> Not sure you can do copy_to_user inside an RCU section, doesn't it
> sleep?
Good point, I need to copy that aux->id somewhere and exit rcu section.
> > + rcu_read_unlock();
> > + return -EFAULT;
> > + }
> > + }
> > + rcu_read_unlock();
>
next prev parent reply other threads:[~2019-04-24 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 23:21 [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type Stanislav Fomichev
2019-04-23 23:22 ` [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status Stanislav Fomichev
2019-04-23 23:32 ` Jakub Kicinski
2019-04-24 0:13 ` Stanislav Fomichev
2019-04-24 8:12 ` Quentin Monnet
2019-04-24 15:42 ` Stanislav Fomichev
2019-04-23 23:28 ` [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type Jakub Kicinski
2019-04-24 0:12 ` Stanislav Fomichev [this message]
2019-04-24 18:48 ` kbuild test robot
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=20190424001206.GA1247@mini-arch \
--to=sdf@fomichev.me \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.com \
--cc=sdf@google.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.