From: Greg KH <greg@kroah.com>
To: Mark Salyzyn <mark_salyzyn@xyratex.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
jack_wang Wang <jack_wang@usish.com>,
crystal_yu <crystal_yu@usish.com>,
lindar_liu <lindar_liu@usish.com>,
James Bottomley <JBottomley@parallels.com>
Subject: Re: [PATCH] pm8001: panics/lockups from asynchronous device removal.
Date: Wed, 18 Jan 2012 08:27:48 -0800 [thread overview]
Message-ID: <20120118162748.GA22156@kroah.com> (raw)
In-Reply-To: <D6D2776D-2AA8-461A-AA96-EB80B63CE625@xyratex.com>
On Wed, Jan 18, 2012 at 11:08:27AM -0500, Mark Salyzyn wrote:
> Thanks, Comments inline
>
> On Jan 17, 2012, at 11:04 PM, Dan Williams wrote:
>
> > On Tue, Jan 17, 2012 at 10:29 AM, Mark Salyzyn <mark_salyzyn@xyratex.com> wrote:
> >> pm8001_query_task() and pm8001_abort_task() panic kernel when
> >> devices asynchronously disappear, a possible scenario since these
> >> functions are generally called when errors are mounting. Some of
> >> the panics are a direct result of a failure to NULL check some of
> >> the structure variables that are in certain states of teardown. One
> >> of the lockups was a direct result of returning an unexpected code
> >> to libsas' sas_scsi_find_task() function (creating a tight loop of
> >> an unexpected code 138 upstream to the scsi layer queue function).
> >>
> >> Signed-off-by: mark_salyzyn@xyratex.com
> >> Cc: jack_wang@usish.com
> >> Cc: JBottomley@parallels.com
> >> Cc: crystal_yu@usish.com
> >> Cc: john_gong@usish.com
> >> Cc: lindar_liu <lindar_liu@usish.com>
> >
> > While your in the area of libsas error handling, mind weighing in on the pending libsas error handling rework backlog?
> >
> > http://git.kernel.org/?p=linux/kernel/git/djbw/isci.git;a=shortlog;h=refs/heads/libsas-eh-reworks-v4
>
> Xyratex has me focussed on 2.6.32 problems, I will look at these, but
> will be off the reservation (and with no Q/A testing resource to keep
> me honest) when doing so ;-}. Pure Code Inspection thus trumps
> experimentation ...
>
> > ...more notes below:
> >
> >> @@ -986,7 +997,8 @@ int pm8001_abort_task(struct sas_task *task)
> >> struct pm8001_device *pm8001_dev;
> >> struct pm8001_tmf_task tmf_task;
> >> int rc = TMF_RESP_FUNC_FAILED;
> >> - if (unlikely(!task || !task->lldd_task || !task->dev))
> >> + if (unlikely(!task || !task->lldd_task
> >> + || !task->dev || !task->dev->lldd_dev))
> >
> > Hmm some of these are "never can happen" checks, so if you are indeed
> > seeing !task or !task->dev something is very wrong in libsas. checking
> > task->lldd_task and task->dev->lldd_dev should be all that is
> > required.
>
> OK, point taken, these issues surface with careless abandon in the
> 2.6.32-vintage kernels; and may, or may not, be present in
> 3.2.1-vintage kernels.
>
> What this means is that maybe we should be submitting these
> stabilization/band-aid patches to the stable trees rather than to the
> top-of-tree?
>
> I'd opt (not that I have the rights) for paranoia and adding these in
> at top-of-tree, as band-aids against panics (in libsas or pm8001). The
> checks are not costly IMHO (hopefully less-so as wrapped by
> unlikely()). My WAG is that this patch should be cancelled here, and
> placed into the 2.6.32-stable bucket ...
>
> Looking forward to yours and Greg's comments to straighten me out.
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2012-01-18 16:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 18:29 [PATCH] pm8001: panics/lockups from asynchronous device removal Mark Salyzyn
2012-01-18 1:37 ` Jack Wang
2012-01-18 14:03 ` [PATCH] pm8001: panics/lockups from asynchronous device removal (take 2) Mark Salyzyn
2012-01-18 4:04 ` [PATCH] pm8001: panics/lockups from asynchronous device removal Dan Williams
2012-01-18 16:08 ` Mark Salyzyn
2012-01-18 16:27 ` Greg KH [this message]
2012-01-18 17:47 ` Dan Williams
2012-01-18 21:28 ` Mark Salyzyn
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=20120118162748.GA22156@kroah.com \
--to=greg@kroah.com \
--cc=JBottomley@parallels.com \
--cc=crystal_yu@usish.com \
--cc=dan.j.williams@intel.com \
--cc=jack_wang@usish.com \
--cc=lindar_liu@usish.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@xyratex.com \
/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