Commit a0630a05 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Treehugger Robot
Browse files

UPSTREAM: cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()

syzbot is hitting percpu_rwsem_assert_held(&cpu_hotplug_lock) warning at
cpuset_attach() [1], for commit 4f7e7236 ("cgroup: Fix
threadgroup_rwsem <-> cpus_read_lock() deadlock") missed that
cpuset_attach() is also called from cgroup_attach_task_all().
Add cpus_read_lock() like what cgroup_procs_write_start() does.

Bug: 254441685
Link: https://syzkaller.appspot.com/bug?extid=29d3a3b4d86c8136ad9e

 [1]
Reported-by: default avatarsyzbot <syzbot+29d3a3b4d86c8136ad9e@syzkaller.appspotmail.com>
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 4f7e7236 ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock")
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
(cherry picked from commit 43626dad)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ifd2f0fb1e4e8c3d474dc4a1d943ae92ff3b0d145
parent 2a11f678
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment