mbox series

[0/2] Avoid that .queuecommand() gets called for a quiesced SCSI device

Message ID 20190326204331.54352-1-bvanassche@acm.org (mailing list archive)
Headers show
Series Avoid that .queuecommand() gets called for a quiesced SCSI device | expand

Message

Bart Van Assche March 26, 2019, 8:43 p.m. UTC
Hi Martin,

As explained in a recent LSF/MM topic proposal, it can happen that the SCSI
error handler calls .queuecommand() for quiesced SCSI devices. SCSI LLDs do
not expect this. Hence this patch series. Please consider this series for
kernel v5.2.

Thanks,

Bart.

Bart Van Assche (2):
  scsi: Avoid that .queuecommand() gets called for a quiesced SCSI
    device
  RDMA/srp: Fix a sleep-in-invalid-context bug

 drivers/infiniband/ulp/srp/ib_srp.c | 21 ++-------------------
 drivers/scsi/scsi_error.c           | 26 ++++++++++++++++++++++++--
 2 files changed, 26 insertions(+), 21 deletions(-)

Comments

Ming Lei March 27, 2019, 1:58 a.m. UTC | #1
On Wed, Mar 27, 2019 at 4:44 AM Bart Van Assche <bvanassche@acm.org> wrote:
>
> Hi Martin,
>
> As explained in a recent LSF/MM topic proposal, it can happen that the SCSI
> error handler calls .queuecommand() for quiesced SCSI devices. SCSI LLDs do
> not expect this. Hence this patch series. Please consider this series for
> kernel v5.2.
>
> Thanks,
>
> Bart.
>
> Bart Van Assche (2):
>   scsi: Avoid that .queuecommand() gets called for a quiesced SCSI
>     device
>   RDMA/srp: Fix a sleep-in-invalid-context bug
>
>  drivers/infiniband/ulp/srp/ib_srp.c | 21 ++-------------------
>  drivers/scsi/scsi_error.c           | 26 ++++++++++++++++++++++++--
>  2 files changed, 26 insertions(+), 21 deletions(-)
>
> --
> 2.21.0.196.g041f5ea1cf98
>

Given it is a IB/SRP specific issue, could you consider the following
one-line fix?

https://marc.info/?l=linux-block&m=151585814931471&w=2

Thanks,
Ming Lei
Christoph Hellwig March 27, 2019, 8:12 a.m. UTC | #2
On Wed, Mar 27, 2019 at 09:58:16AM +0800, Ming Lei wrote:
> Given it is a IB/SRP specific issue, could you consider the following
> one-line fix?

It isn't really a IB/SRP specific issue, it is just that the SRP
maintainer actually tried to fix this race that others often ignored.

And checking for context in queuecommand is a horrible hack that I'd
like to get rid of.
Bart Van Assche March 27, 2019, 11:58 p.m. UTC | #3
On Wed, 2019-03-27 at 09:12 +0100, Christoph Hellwig wrote:
> On Wed, Mar 27, 2019 at 09:58:16AM +0800, Ming Lei wrote:
> > Given it is a IB/SRP specific issue, could you consider the following
> > one-line fix?
> 
> It isn't really a IB/SRP specific issue, it is just that the SRP
> maintainer actually tried to fix this race that others often ignored.
> 
> And checking for context in queuecommand is a horrible hack that I'd
> like to get rid of.

Thanks Christoph. I think that's a good summary.

Bart.