lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yv0oEOXddKp+Xo1U@slm.duckdns.org>
Date:   Wed, 17 Aug 2022 07:40:32 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Mukesh Ojha <quic_mojha@...cinc.com>
Cc:     Michal Koutný <mkoutny@...e.com>,
        Xuewen Yan <xuewen.yan94@...il.com>,
        Imran Khan <imran.f.khan@...cle.com>, lizefan.x@...edance.com,
        hannes@...xchg.org, tglx@...utronix.de, steven.price@....com,
        peterz@...radead.org, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, Zhao Gongyi <zhaogongyi@...wei.com>,
        Zhang Qiao <zhangqiao22@...wei.com>
Subject: Re: [PATCH cgroup/for-6.0-fixes] cgroup: Fix threadgroup_rwsem <->
 cpus_read_lock() deadlock

On Mon, Aug 15, 2022 at 01:27:38PM -1000, Tejun Heo wrote:
> Bringing up a CPU may involve creating new tasks which requires read-locking
> threadgroup_rwsem, so threadgroup_rwsem nests inside cpus_read_lock().
> However, cpuset's ->attach(), which may be called with thredagroup_rwsem
> write-locked, also wants to disable CPU hotplug and acquires
> cpus_read_lock(), leading to a deadlock.
> 
> Fix it by guaranteeing that ->attach() is always called with CPU hotplug
> disabled and removing cpus_read_lock() call from cpuset_attach().
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>

Applied to cgroup/for-6.0-fixes w/ commit message and comment update
suggested by Xuewen and Fixes / stable tags added.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ