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] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bb140e5-ac13-4947-98e4-6e35cdf5fc75@linux.ibm.com>
Date: Mon, 17 Nov 2025 15:41:03 +0530
From: Nilay Shroff <nilay@...ux.ibm.com>
To: Yu Kuai <yukuai@...as.com>, axboe@...nel.dk, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, tj@...nel.org, ming.lei@...hat.com
Subject: Re: [PATCH RESEND 2/5] blk-wbt: fix incorrect lock order for
 rq_qos_mutex and freeze queue



On 11/16/25 9:40 AM, Yu Kuai wrote:
> wbt_init() can be called from sysfs attribute and wbt_enable_default(),
> however the lock order are inversely.
> 
> - queue_wb_lat_store() freeze queue first, and then wbt_init() hold
>   rq_qos_mutex. In this case queue will be freezed again inside
>   rq_qos_add(), however, in this case freeze queue recursivly is
>   inoperative;
> - wbt_enable_default() from elevator switch will hold rq_qos_mutex
>   first, and then rq_qos_add() will freeze queue;
> 
> Fix this problem by converting to use new helper rq_qos_add_freezed() in
> wbt_init(), and for wbt_enable_default(), freeze queue before calling
> wbt_init().
> 
> Fixes: a13bd91be223 ("block/rq_qos: protect rq_qos apis with a new lock")
> Signed-off-by: Yu Kuai <yukuai@...as.com>

Looks good to me:
Reviewed-by: Nilay Shroff <nilay@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ