Re: [PATCH] scsi: snic: Fix scsi host leak on workqueue allocation failure

From: Martin K. Petersen (Oracle)

Date: Sun Aug 23 2026 - 22:16:07 EST



Chen,

> 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-staging, thanks!

--
Martin K. Petersen