From: Daniel Borkmann <daniel@iogearbox.net>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Tejun Heo <tj@kernel.org>,
cgroups@vger.kernel.org, Li Zefan <lizefan@huawei.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] cgroup: net_cls: fix false-positive "suspicious RCU usage"
Date: Wed, 22 Jul 2015 13:56:44 +0200 [thread overview]
Message-ID: <55AF84FC.2070502@iogearbox.net> (raw)
In-Reply-To: <20150722092320.30663.86742.stgit@buzz>
On 07/22/2015 11:23 AM, Konstantin Khlebnikov wrote:
> In dev_queue_xmit() net_cls protected with rcu-bh.
...
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
> net/core/netclassid_cgroup.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
> index 1f2a126f4ffa..6441f47b1a8f 100644
> --- a/net/core/netclassid_cgroup.c
> +++ b/net/core/netclassid_cgroup.c
> @@ -23,7 +23,8 @@ static inline struct cgroup_cls_state *css_cls_state(struct cgroup_subsys_state
>
> struct cgroup_cls_state *task_cls_state(struct task_struct *p)
> {
> - return css_cls_state(task_css(p, net_cls_cgrp_id));
> + return css_cls_state(task_css_check(p, net_cls_cgrp_id,
> + rcu_read_lock_bh_held()));
Did you also check that after your patch this doesn't trigger on ingress
either? There, this code path could be invoked under rcu_read_lock(). So,
perhaps you need to check for both.
> }
> EXPORT_SYMBOL_GPL(task_cls_state);
next prev parent reply other threads:[~2015-07-22 11:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 16:46 [PATCH] cgroup: net_cls: fix false-positive "suspicious RCU usage" Konstantin Khlebnikov
2015-07-22 5:28 ` David Miller
2015-07-22 9:23 ` [PATCH v2] " Konstantin Khlebnikov
2015-07-22 11:56 ` Daniel Borkmann [this message]
[not found] ` <55AF84FC.2070502-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-07-22 12:03 ` Konstantin Khlebnikov
[not found] ` <55AF869E.4030304-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org>
2015-07-22 12:06 ` Daniel Borkmann
2015-07-25 7:13 ` David Miller
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=55AF84FC.2070502@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=cgroups@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).