Messages in this thread | ![/](/images/icornerl.gif) | | Date | Sat, 6 Sep 2014 07:44:06 -0700 | From | Christoph Hellwig <> | Subject | Re: [PATCH] scsi_debug: deadlock between completions and surprise module removal |
| |
On Sat, Sep 06, 2014 at 10:40:06AM -0400, Douglas Gilbert wrote: > And they do call scsi_remove_host(). But they do that toward > the end of their clean-up. The problem that I observed has > already happened before that. > > IOW I think the QUEUE_FLAG_DYING state needs to be set and > acknowledged as the first order of business by the code > that implements 'rmmod LLD'.
That's how driver should implement their ->remove driver callback:
foo_remove() { scsi_remove_host() < actual cleanup here>
scsi_host_put(); }
if a driver doesn't do that, thats a bug in the driver which needs fixing.
| ![\](/images/icornerr.gif) |