+9
−3
Loading
mainline inclusion from mainline-v6.2-rc1 commit 40602997 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBSG04 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=40602997be26887bdfa3d58659c3acb4579099e9 ------------------ blk_register_queue fails to handle errors from blk_mq_sysfs_register, leaks various resources on errors and accidentally sets queue refs percpu refcount to percpu mode on kobject_add failure. Fix all that by properly unwinding on errors. Signed-off-by:Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20221114042637.1009333-4-hch@lst.de Signed-off-by:
Jens Axboe <axboe@kernel.dk> Conflicts: block/blk-sysfs.c [Context conflicts.] Signed-off-by:
Zheng Qixing <zhengqixing@huawei.com>