From: Vladislav Bolkhovitin <vst@vlnb.net>
To: linux-driver@qlogic.com
Cc: Gal Rosen <galr@storwize.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi@vger.kernel.org, scst-devel@lists.sourceforge.net
Subject: Re: [PATCH] qla2xxx: Fix dpc_thread race on the module unload
Date: Thu, 31 Jul 2008 13:11:32 +0400 [thread overview]
Message-ID: <489181C4.70003@vlnb.net> (raw)
In-Reply-To: <1217484743.25491.7.camel@galr-linux>
Gal Rosen wrote:
> Andrew,
>
> Add checking of the flag online still does not answer the race that Vlad
> stated before,
Yes, that's true.
And, since ha->flags.online set to 0 not only on shutdown, I'm afraid
you could introduce a new set of subtle bugs, if not for the moment, but
in the future, because with your patch it gets impossible to wake up the
DPC thread if HA is offline.
Vlad
> unless you thought about another way without lock to
> protect this thread.
>
>> Nope, taking only one that hunk from this patch isn't sufficient.
>> Around
>> dpc_thread there is pretty simple and classical race. You can't do
>>
>> if (x != NULL)
>> y = *x;
>>
>> without any protection, if x can be set to NULL by another thread. It
>> can happen exactly between "if" and "*x" and hence lead to a crash,
>> correct?
>
> Gal.
>
next prev parent reply other threads:[~2008-07-31 9:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 17:33 [PATCH] qla2xxx: Fix dpc_thread race on the module unload Vladislav Bolkhovitin
2008-07-28 17:41 ` Andrew Vasquez
2008-07-28 17:49 ` Vladislav Bolkhovitin
2008-07-28 17:56 ` James Bottomley
2008-07-28 18:14 ` Vladislav Bolkhovitin
2008-07-29 7:30 ` Gal Rosen
2008-07-30 7:10 ` Gal Rosen
2008-07-31 6:12 ` Gal Rosen
2008-07-31 9:11 ` Vladislav Bolkhovitin [this message]
2008-07-31 16:02 ` Andrew Vasquez
2008-07-31 17:41 ` Vladislav Bolkhovitin
2008-07-31 17:55 ` Andrew Vasquez
2008-08-01 12:28 ` Vladislav Bolkhovitin
2008-07-29 4:27 ` Christoph Hellwig
2008-07-29 9:32 ` Vladislav Bolkhovitin
2008-07-28 18:07 ` Andrew Vasquez
2008-07-29 9:32 ` Vladislav Bolkhovitin
2008-07-29 14:40 ` James Bottomley
2008-07-29 15:13 ` Vladislav Bolkhovitin
2008-07-29 15:28 ` James Bottomley
2008-07-29 15:36 ` Vladislav Bolkhovitin
2008-07-30 10:30 ` Andrew Vasquez
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=489181C4.70003@vlnb.net \
--to=vst@vlnb.net \
--cc=James.Bottomley@HansenPartnership.com \
--cc=galr@storwize.com \
--cc=linux-driver@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=scst-devel@lists.sourceforge.net \
/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