From: Michal Hocko <mhocko@kernel.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race
Date: Fri, 28 Aug 2015 17:17:24 +0200 [thread overview]
Message-ID: <20150828151724.GH5301@dhcp22.suse.cz> (raw)
In-Reply-To: <1440773773.2202.9.camel@HansenPartnership.com>
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
prev parent reply other threads:[~2015-08-28 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 18:16 [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race mhocko
2015-08-27 18:28 ` Dan Williams
2015-08-28 6:40 ` Hannes Reinecke
2015-08-28 14:56 ` James Bottomley
2015-08-28 15:17 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150828151724.GH5301@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox