From: Li Zefan <lizefan@huawei.com>
To: Michael Wang <wangyun@linux.vnet.ibm.com>
Cc: Sasha Levin <sasha.levin@oracle.com>, Tejun Heo <tj@kernel.org>,
Dave Jones <davej@redhat.com>, Cgroups <cgroups@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: cgroup: INFO: suspicious RCU usage. in cgroup_name
Date: Thu, 7 Mar 2013 14:21:29 +0800 [thread overview]
Message-ID: <513831E9.80304@huawei.com> (raw)
In-Reply-To: <5138309A.2060804@linux.vnet.ibm.com>
On 2013/3/7 14:15, Michael Wang wrote:
> On 03/07/2013 12:02 AM, Sasha Levin wrote:
>> Hi all,
>>
>> While fuzzing with trinity inside a KVM tools guest running latest -next kernel
>> I've stumbled on the following:
>>
>> [ 450.180599] ===============================
>> [ 450.181392] [ INFO: suspicious RCU usage. ]
>> [ 450.182101] 3.9.0-rc1-next-20130305-sasha-00048-g35e9ec5-dirty #1032 Tainted: G W
>> [ 450.183482] -------------------------------
>> [ 450.184343] include/linux/cgroup.h:429 suspicious rcu_dereference_check() usage!
>> [ 450.185575]
>> [ 450.185575] other info that might help us debug this:
>> [ 450.185575]
>> [ 450.186961]
>> [ 450.186961] rcu_scheduler_active = 1, debug_locks = 1
>> [ 450.188001] 4 locks held by kworker/u:0/6:
>> [ 450.188646] #0: (khelper){.+.+.+}, at: [<ffffffff8112ba98>] process_one_work+0x238/0x570
>> [ 450.190186] #1: ((&sub_info->work)){+.+.+.}, at: [<ffffffff8112ba98>] process_one_work+0x238/0x570
>> [ 450.191824] #2: (&(&p->alloc_lock)->rlock){+.+.-.}, at: [<ffffffff812036d3>] dump_header+0x43/0xe0
>
> Hi, Sasha
>
> I suppose this is the warn context:
>
> cpuset_print_task_mems_allowed() -> task_cs() -> task_subsys_state()
>
> and this is the definition of task_subsys_state():
>
> #define task_subsys_state_check(task, subsys_id, __c) \
> rcu_dereference_check(task->cgroups->subsys[subsys_id], \
> lockdep_is_held(&task->alloc_lock) || \
> cgroup_lock_is_held() || (__c))
>
> the condition "lockdep_is_held(&task->alloc_lock)" should match (#2
> lock), the warn doesn't make sense to me...
>
nope..note this is 3.9-rc1-next, not 3.9-rc1.
The warning is from this:
/* Caller should hold rcu_read_lock() */
static inline const char *cgroup_name(const struct cgroup *cgrp)
{
return rcu_dereference(cgrp->name)->name;
}
I've cooked up a patch. Will send out today.
prev parent reply other threads:[~2013-03-07 6:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 16:02 cgroup: INFO: suspicious RCU usage. in cgroup_name Sasha Levin
2013-03-07 2:29 ` Li Zefan
2013-03-07 6:15 ` Michael Wang
2013-03-07 6:21 ` Li Zefan [this message]
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=513831E9.80304@huawei.com \
--to=lizefan@huawei.com \
--cc=cgroups@vger.kernel.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sasha.levin@oracle.com \
--cc=tj@kernel.org \
--cc=wangyun@linux.vnet.ibm.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