summaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorZheng Qixing <zhengqixing@huawei.com>2025-04-12 17:25:54 +0800
committerJens Axboe <axboe@kernel.dk>2025-04-14 08:28:26 -0600
commit40f2eb9b531475dd01b683fdaf61ca3cfd03a51e (patch)
treed7b9ec6e04b2d703d948e8080fa7d3182a8e57bd /rust/helpers/helpers.c
parent1b4194053f6b30556272ff11750dd518e067ea49 (diff)
downloadlinux-40f2eb9b531475dd01b683fdaf61ca3cfd03a51e.tar.gz
linux-40f2eb9b531475dd01b683fdaf61ca3cfd03a51e.tar.bz2
linux-40f2eb9b531475dd01b683fdaf61ca3cfd03a51e.zip
block: fix resource leak in blk_register_queue() error path
When registering a queue fails after blk_mq_sysfs_register() is successful but the function later encounters an error, we need to clean up the blk_mq_sysfs resources. Add the missing blk_mq_sysfs_unregister() call in the error path to properly clean up these resources and prevent a memory leak. Fixes: 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism") Signed-off-by: Zheng Qixing <zhengqixing@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20250412092554.475218-1-zhengqixing@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions