From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/2] cpuset: fix a locking issue in cpuset_migrate_mm()
Date: Thu, 27 Feb 2014 18:29:38 +0800 [thread overview]
Message-ID: <530F1392.2090407@huawei.com> (raw)
In-Reply-To: <530F1117.1020605-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On 2014/2/27 18:19, Li Zefan wrote:
> I can trigger a lockdep warning:
>
> # mount -t cgroup -o cpuset xxx /cgroup
> # mkdir /cgroup/cpuset
> # mkdir /cgroup/tmp
> # echo 0 > /cgroup/tmp/cpuset.cpus
> # echo 0 > /cgroup/tmp/cpuset.mems
> # echo 1 > /cgroup/tmp/cpuset.memory_migrate
> # echo $$ > /cgroup/tmp/tasks
> # echo 1 > /cgruop/tmp/cpuset.mems
>
> ===============================
> [ INFO: suspicious RCU usage. ]
> 3.14.0-rc1-0.1-default+ #32 Not tainted
> -------------------------------
> include/linux/cgroup.h:682 suspicious rcu_dereference_check() usage!
> ...
> [<ffffffff81582174>] dump_stack+0x72/0x86
> [<ffffffff810b8f01>] lockdep_rcu_suspicious+0x101/0x140
> [<ffffffff81105ba1>] cpuset_migrate_mm+0xb1/0xe0
> ...
>
> We used to hold cgroup_mutex when calling cpuset_migrate_mm(), but now
> we hold cpuset_mutex, which causes task_css() to complain.
>
> This is not a false-positive but a real issue.
>
> Holding cpuset_mutex won't prevent a task's cpuset from changing, and
I meant it won't prevent a task from migrating to another cpuset.
> it won't prevent the original task->cgroup from destroying during this
> change.
WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH 1/2] cpuset: fix a locking issue in cpuset_migrate_mm()
Date: Thu, 27 Feb 2014 18:29:38 +0800 [thread overview]
Message-ID: <530F1392.2090407@huawei.com> (raw)
In-Reply-To: <530F1117.1020605@huawei.com>
On 2014/2/27 18:19, Li Zefan wrote:
> I can trigger a lockdep warning:
>
> # mount -t cgroup -o cpuset xxx /cgroup
> # mkdir /cgroup/cpuset
> # mkdir /cgroup/tmp
> # echo 0 > /cgroup/tmp/cpuset.cpus
> # echo 0 > /cgroup/tmp/cpuset.mems
> # echo 1 > /cgroup/tmp/cpuset.memory_migrate
> # echo $$ > /cgroup/tmp/tasks
> # echo 1 > /cgruop/tmp/cpuset.mems
>
> ===============================
> [ INFO: suspicious RCU usage. ]
> 3.14.0-rc1-0.1-default+ #32 Not tainted
> -------------------------------
> include/linux/cgroup.h:682 suspicious rcu_dereference_check() usage!
> ...
> [<ffffffff81582174>] dump_stack+0x72/0x86
> [<ffffffff810b8f01>] lockdep_rcu_suspicious+0x101/0x140
> [<ffffffff81105ba1>] cpuset_migrate_mm+0xb1/0xe0
> ...
>
> We used to hold cgroup_mutex when calling cpuset_migrate_mm(), but now
> we hold cpuset_mutex, which causes task_css() to complain.
>
> This is not a false-positive but a real issue.
>
> Holding cpuset_mutex won't prevent a task's cpuset from changing, and
I meant it won't prevent a task from migrating to another cpuset.
> it won't prevent the original task->cgroup from destroying during this
> change.
next prev parent reply other threads:[~2014-02-27 10:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 10:19 [PATCH 1/2] cpuset: fix a locking issue in cpuset_migrate_mm() Li Zefan
2014-02-27 10:19 ` Li Zefan
2014-02-27 10:19 ` [PATCH 2/2] cpuset: fix a race condition in __cpuset_node_allowed_softwall() Li Zefan
[not found] ` <530F1138.2090903-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-02-27 14:40 ` Tejun Heo
2014-02-27 14:40 ` Tejun Heo
[not found] ` <530F1117.1020605-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-02-27 10:29 ` Li Zefan [this message]
2014-02-27 10:29 ` [PATCH 1/2] cpuset: fix a locking issue in cpuset_migrate_mm() Li Zefan
2014-02-27 14:37 ` Tejun Heo
2014-02-27 14:37 ` Tejun Heo
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=530F1392.2090407@huawei.com \
--to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 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.