Re: [PATCH] scsi: snic: Fix scsi host leak on workqueue allocation failure
From: Martin K. Petersen (Oracle)
Date: Wed Aug 26 2026 - 11:20:42 EST
On Mon, 27 Jul 2026 15:34:38 +0800, Chen Changcheng wrote:
> In snic_add_host(), if scsi_add_host() succeeds but
> alloc_ordered_workqueue() fails, the function returns -ENOMEM
> with shost->work_q left as NULL. The caller's error path then
> calls snic_del_host(), which returns early when !shost->work_q
> without calling scsi_remove_host(). The Scsi_Host remains
> registered in sysfs as a zombie device even after the probe
> has failed. This causes:
>
> [...]
Applied to 7.3/scsi-queue, thanks!
[1/1] scsi: snic: Fix scsi host leak on workqueue allocation failure
https://git.kernel.org/mkp/scsi/c/12e67eb89eb2
--
Martin K. Petersen