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: <175643048957.32759.11740311974610130180.b4-ty@kernel.dk>
Date: Thu, 28 Aug 2025 19:21:29 -0600
From: Jens Axboe <axboe@...nel.dk>
To: ming.lei@...hat.com, jianchao.w.wang@...cle.com, 
 linan666@...weicloud.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
 yukuai3@...wei.com, yangerkun@...wei.com, yi.zhang@...wei.com
Subject: Re: [PATCH] blk-mq: check kobject state_in_sysfs before deleting
 in blk_mq_unregister_hctx


On Tue, 26 Aug 2025 16:48:54 +0800, linan666@...weicloud.com wrote:
> In __blk_mq_update_nr_hw_queues() the return value of
> blk_mq_sysfs_register_hctxs() is not checked. If sysfs creation for hctx
> fails, later changing the number of hw_queues or removing disk will
> trigger the following warning:
> 
>   kernfs: can not remove 'nr_tags', no directory
>   WARNING: CPU: 2 PID: 637 at fs/kernfs/dir.c:1707 kernfs_remove_by_name_ns+0x13f/0x160
>   Call Trace:
>    remove_files.isra.1+0x38/0xb0
>    sysfs_remove_group+0x4d/0x100
>    sysfs_remove_groups+0x31/0x60
>    __kobject_del+0x23/0xf0
>    kobject_del+0x17/0x40
>    blk_mq_unregister_hctx+0x5d/0x80
>    blk_mq_sysfs_unregister_hctxs+0x94/0xd0
>    blk_mq_update_nr_hw_queues+0x124/0x760
>    nullb_update_nr_hw_queues+0x71/0xf0 [null_blk]
>    nullb_device_submit_queues_store+0x92/0x120 [null_blk]
> 
> [...]

Applied, thanks!

[1/1] blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx
      commit: 4c7ef92f6d4d08a27d676e4c348f4e2922cab3ed

Best regards,
-- 
Jens Axboe




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ