]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nvmet: add sanity checks when freeing subsystem
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Wed, 24 Sep 2025 20:35:44 +0000 (23:35 +0300)
committerKeith Busch <kbusch@kernel.org>
Mon, 1 Dec 2025 16:53:17 +0000 (08:53 -0800)
commit7fce856f1180c2db3c9f5a88b04bb7124a20cb21
tree55f5622e157bb4b3bdebc82fac4365d1de13aa93
parentd211a2803551c8ffdf0b97d129388f7d9cc129b5
nvmet: add sanity checks when freeing subsystem

Add WARN_ON_ONCE checks in nvmet_subsys_free() to ensure that the
ctrls and hosts lists are all empty during subsystem release. This helps
catch resource leaks.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/core.c