Re: [PATCH] Waiting for scsi_host_template release

2018-04-18 Thread Anatoliy Glagolev
Sent out a new patch with "bsg referencing bus driver module" in subj. On Wed, Apr 11, 2018 at 4:37 PM, Anatoliy Glagolev wrote: > On "what was the actual error": it is deref of an invalid address, not > NULL. Attaching crash dump analysis for the reference. > > On module

Re: [PATCH] Waiting for scsi_host_template release

2018-04-11 Thread Anatoliy Glagolev
On "what was the actual error": it is deref of an invalid address, not NULL. Attaching crash dump analysis for the reference. On module reference count: good point. I decided against it at first, but I can reconsider. "modprobe -r qla2xxx" will fail if there is an extra reference to the module,

Re: [PATCH] Waiting for scsi_host_template release

2018-04-11 Thread James Bottomley
On Wed, 2018-04-11 at 12:22 -0700, Anatoliy Glagolev wrote: > Hannes, James, thanks a lot for taking a look! > > On the problem the patch is solving: it is in the "Description" part > of my initial e-mail. If you agree that a Scsi_Host may be around > after a driver has unloaded, the problem

Re: [PATCH] Waiting for scsi_host_template release

2018-04-11 Thread Anatoliy Glagolev
Hannes, James, thanks a lot for taking a look! On the problem the patch is solving: it is in the "Description" part of my initial e-mail. If you agree that a Scsi_Host may be around after a driver has unloaded, the problem applies to any driver creating a new Scsi_Host. I fixed it in qla2xxx to

Re: [PATCH] Waiting for scsi_host_template release

2018-04-11 Thread James Bottomley
On Wed, 2018-04-11 at 16:11 +0200, Hannes Reinecke wrote: > On Mon, 9 Apr 2018 23:23:51 -0700 > Anatoliy Glagolev wrote: > > > Description: > > SCSI mid-layer may hold references to Scsi_Host structs when > > the owning module has already unloaded. Scsi_Host release path > >

Re: [PATCH] Waiting for scsi_host_template release

2018-04-11 Thread Hannes Reinecke
On Mon, 9 Apr 2018 23:23:51 -0700 Anatoliy Glagolev wrote: > Description: > SCSI mid-layer may hold references to Scsi_Host structs when > the owning module has already unloaded. Scsi_Host release path > touches scsi_host_template struct that is usually allocated > in the