Re: [PATCH] RDMA/srp: Do not call scsi_done() from srp_abort()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Aug 24, 2023 / 07:38, Bart Van Assche wrote:
> On 8/23/23 19:46, Shinichiro Kawasaki wrote:
> > On Aug 23, 2023 / 13:57, Bart Van Assche wrote:
> > > After scmd_eh_abort_handler() has called the SCSI LLD eh_abort_handler
> > > callback, it performs one of the following actions:
> > > * Call scsi_queue_insert().
> > > * Call scsi_finish_command().
> > > * Call scsi_eh_scmd_add().
> > > Hence, SCSI abort handlers must not call scsi_done(). Otherwise all
> > > the above actions would trigger a use-after-free. Hence remove the
> > > scsi_done() call from srp_abort(). Keep the srp_free_req() call
> > > before returning SUCCESS because we may not see the command again if
> > > SUCCESS is returned.
> > > 
> > > Cc: Bob Pearson <rpearsonhpe@xxxxxxxxx>
> > > Cc: Shinichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> > > Fixes: d8536670916a ("IB/srp: Avoid having aborted requests hang")
> > > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> > 
> > Thanks Bart. Do you think this patch fixes the hangs at blktests srp/002 and
> > srp/011? I tried this patch and still see the hang at srp/002, but the hang at
> > srp/011 looks disappearing.
> 
> I have not yet tried to verify whether the above patch affects any blktests.
> The above patch is a patch that I developed a few weeks ago but that had not
> yet been published on the linux-rdma mailing list.

Thanks for the explanation. I do not observe regression with this patch on my
blktests test runs. It looks good that it avoids the srp/011 hang, but not sure
why it avoids it.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux