From: Jeff Garzik <jeff@garzik.org>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
linux-ide <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] libsas: fix ata list corruption issue
Date: Thu, 10 Mar 2011 20:28:35 -0500 [thread overview]
Message-ID: <4D797AC3.2050202@garzik.org> (raw)
In-Reply-To: <1299798798.11933.167.camel@mulgrave.site>
On 03/10/2011 06:13 PM, James Bottomley wrote:
> I think this stems from a misunderstanding of how the ata error handler
> works. ata_scsi_cmd_error_handler() gets called with a passed in list
> of commands to handle. However, that list may still not be empty when
> it exits. The command ata_scsi_port_error_handler() must be called
> (which takes no list) before the list will be completely emptied. This
> bites the sas error handler because the two are called from different
> functions and the original list has gone out of scope before
> ata_scsi_port_error_handler() is called. leading to some commands
> dangling on bare stack, which is a potential memory corruption issue.
> Fix this by manually deleting all outstanding commands from the on-stack
> list before it goes out of scope.
Good catch...
next prev parent reply other threads:[~2011-03-11 1:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 23:13 [PATCH] libsas: fix ata list corruption issue James Bottomley
2011-03-11 1:28 ` Jeff Garzik [this message]
2011-03-11 17:19 ` James Bottomley
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=4D797AC3.2050202@garzik.org \
--to=jeff@garzik.org \
--cc=James.Bottomley@suse.de \
--cc=linux-ide@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