lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
On Thu, Aug 25, 2022 at 05:38:38PM +0900, Tetsuo Handa wrote:
> syzbot is hitting percpu_rwsem_assert_held(&cpu_hotplug_lock) warning at
> cpuset_attach() [1], for commit 4f7e7236435ca0ab ("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.
>
> Link: https://syzkaller.appspot.com/bug?extid=29d3a3b4d86c8136ad9e [1]
> Reported-by: syzbot <syzbot+29d3a3b4d86c8136ad9e@syzkaller.appspotmail.com>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock")

Applied to cgroup/for-6.0-fixes and sent pull request.

> Waiting for test result from syzbot. Should we remove "static" from
> cgroup_attach_lock() and call from cgroup_attach_task_all() ?

Yeah, that probably is better. Can you spin up a follow up patch?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2022-08-25 19:45    [W:0.095 / U:3.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site