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

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

 



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)
> >  	 * We never actually get interrupted because kthread_run
> >  	 * disables signal delivery for the created thread.
> >  	 */
> > -	while (!kthread_should_stop()) {
> > +	while (true) {
> 
> Comment here, I think, please to avoid any other erroneous tidying
> attempts.  How about
> 
> /* 
>  * The sequence in kthread_stop() sets the stop flag first then 
>  * wakes the process.  To avoid missed wakeups, the task should always
>  * be in a non running state before the stop flag is checked
>  */
> 
> Otherwise this looks fine.

I do not have objections to the added comment.

-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux