* [PATCH 2.6.17-rc6] sata_mv: grab host lock inside eng_timeout
@ 2006-06-07 16:53 Mark Lord
2006-06-12 3:06 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Mark Lord @ 2006-06-07 16:53 UTC (permalink / raw)
To: linux-ide; +Cc: Linux Kernel, Linus Torvalds
Bug fix: mv_eng_timeout() calls mv_err_intr() without first grabbing the host lock,
which can lead to all sorts of interesting scenarios.
This whole error-handling portion of sata_mv is nasty (and will get fixed for
the new EH stuff), but for now this patch will help keep it on life-support.
Signed-off-by: Mark Lord <liml@rtr.ca>
---
--- linux/drivers/scsi/sata_mv.c.orig 2006-06-07 12:30:08.000000000 -0400
+++ linux/drivers/scsi/sata_mv.c 2006-06-07 12:30:55.000000000 -0400
@@ -2035,6 +2035,7 @@
static void mv_eng_timeout(struct ata_port *ap)
{
struct ata_queued_cmd *qc;
+ unsigned long flags;
printk(KERN_ERR "ata%u: Entering mv_eng_timeout\n",ap->id);
DPRINTK("All regs @ start of eng_timeout\n");
@@ -2046,8 +2047,10 @@
ap->host_set->mmio_base, ap, qc, qc->scsicmd,
&qc->scsicmd->cmnd);
+ spin_lock_irqsave(&ap->host_set->lock, flags);
mv_err_intr(ap, 0);
mv_stop_and_reset(ap);
+ spin_unlock_irqrestore(&ap->host_set->lock, flags);
WARN_ON(!(qc->flags & ATA_QCFLAG_ACTIVE));
if (qc->flags & ATA_QCFLAG_ACTIVE) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.17-rc6] sata_mv: grab host lock inside eng_timeout
2006-06-07 16:53 [PATCH 2.6.17-rc6] sata_mv: grab host lock inside eng_timeout Mark Lord
@ 2006-06-12 3:06 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-06-12 3:06 UTC (permalink / raw)
To: Mark Lord; +Cc: linux-ide, Linux Kernel, Linus Torvalds
Mark Lord wrote:
> Bug fix: mv_eng_timeout() calls mv_err_intr() without first grabbing the host lock,
> which can lead to all sorts of interesting scenarios.
>
> This whole error-handling portion of sata_mv is nasty (and will get fixed for
> the new EH stuff), but for now this patch will help keep it on life-support.
>
> Signed-off-by: Mark Lord <liml@rtr.ca>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-12 3:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-07 16:53 [PATCH 2.6.17-rc6] sata_mv: grab host lock inside eng_timeout Mark Lord
2006-06-12 3:06 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).