diff options
author | Li Zefan <lizefan@huawei.com> | 2014-02-27 10:19:03 (GMT) |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-03-22 21:01:55 (GMT) |
commit | d1275b0297b1995a15aab2361f4051684c18a2ea (patch) | |
tree | 0d7b0b34fbc7823485048b26717842d9d2a6a1e2 /net/sunrpc/backchannel_rqst.c | |
parent | f81d190308865eea6f2d49f1094bf534b9cd9da0 (diff) | |
download | linux-fsl-qoriq-d1275b0297b1995a15aab2361f4051684c18a2ea.tar.xz |
cpuset: fix a locking issue in cpuset_migrate_mm()
commit 4729583006772b9530404bc1bb7c3aa4a10ffd4d upstream.
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 from migrating to another
cpuset, and it won't prevent the original task->cgroup from destroying
during this change.
Fixes: 5d21cc2db040 (cpuset: replace cgroup_mutex locking with cpuset internal locking)
Signed-off-by: Li Zefan <lizefan@huawei.com>
Sigend-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net/sunrpc/backchannel_rqst.c')
0 files changed, 0 insertions, 0 deletions