Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-28 Thread Michal Hocko
On Fri 28-08-15 07:56:13, James Bottomley wrote: [...] > > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c > > index 6457a8a0db9c..2c0a817d5dbe 100644 > > --- a/drivers/scsi/scsi_error.c > > +++ b/drivers/scsi/scsi_error.c > > @@ -2169,8 +2169,11 @@ int scsi_error_handler(void

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-28 Thread James Bottomley
On Thu, 2015-08-27 at 20:16 +0200, mho...@kernel.org wrote: > From: Michal Hocko > > b9d5c6b7ef57 ("[SCSI] cleanup setting task state in Heh, it's tempting to revert that. The reason is we always need to be interruptible state before we check the flag to avoid missing wakeups. >

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-28 Thread Hannes Reinecke
On 08/27/2015 08:16 PM, mho...@kernel.org wrote: > From: Michal Hocko > > b9d5c6b7ef57 ("[SCSI] cleanup setting task state in > scsi_error_handler()") has introduced a race between scsi_error_handler > and scsi_host_dev_release resulting in the hang when the device goes > away because

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-28 Thread Hannes Reinecke
On 08/27/2015 08:16 PM, mho...@kernel.org wrote: From: Michal Hocko mho...@suse.com b9d5c6b7ef57 ([SCSI] cleanup setting task state in scsi_error_handler()) has introduced a race between scsi_error_handler and scsi_host_dev_release resulting in the hang when the device goes away because

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-28 Thread James Bottomley
On Thu, 2015-08-27 at 20:16 +0200, mho...@kernel.org wrote: From: Michal Hocko mho...@suse.com b9d5c6b7ef57 ([SCSI] cleanup setting task state in Heh, it's tempting to revert that. The reason is we always need to be interruptible state before we check the flag to avoid missing wakeups.

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-28 Thread Michal Hocko
On Fri 28-08-15 07:56:13, James Bottomley wrote: [...] diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 6457a8a0db9c..2c0a817d5dbe 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2169,8 +2169,11 @@ int scsi_error_handler(void *data)

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread Dan Williams
On Thu, Aug 27, 2015 at 11:16 AM, wrote: > From: Michal Hocko > > b9d5c6b7ef57 ("[SCSI] cleanup setting task state in > scsi_error_handler()") has introduced a race between scsi_error_handler > and scsi_host_dev_release resulting in the hang when the device goes > away because

[PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread mhocko
From: Michal Hocko b9d5c6b7ef57 ("[SCSI] cleanup setting task state in scsi_error_handler()") has introduced a race between scsi_error_handler and scsi_host_dev_release resulting in the hang when the device goes away because scsi_error_handler might miss a wake up: CPU0

[PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread mhocko
From: Michal Hocko mho...@suse.com b9d5c6b7ef57 ([SCSI] cleanup setting task state in scsi_error_handler()) has introduced a race between scsi_error_handler and scsi_host_dev_release resulting in the hang when the device goes away because scsi_error_handler might miss a wake up: CPU0

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread Dan Williams
On Thu, Aug 27, 2015 at 11:16 AM, mho...@kernel.org wrote: From: Michal Hocko mho...@suse.com b9d5c6b7ef57 ([SCSI] cleanup setting task state in scsi_error_handler()) has introduced a race between scsi_error_handler and scsi_host_dev_release resulting in the hang when the device goes away