On Wed, 9 Jun 2021 14:27:09 -0500, Mike Christie wrote: > qedi_clear_session_ctx could race with the in-kernel or userspace driven > recovery/removal and we could access a NULL conn or do a double free. > > We should be using iscsi_host_remove to start the removal process from the > driver. It will start the in-kernel recovery and notify userspace that the > driver's scsi_hosts are being removed. iscsid will then drive the session > removal like is done when the logout command is run. When the sessions are > removed, iscsi_host_remove will return so qedi can finish knowing there > are no running sessions and no new sessions will be allowed. > > [...] Applied to 5.14/scsi-queue, thanks! [1/1] scsi: qedi: Fix host removal with running sessions https://git.kernel.org/mkp/scsi/c/d1f2ce77638d -- Martin K. Petersen Oracle Linux Engineering