[PATCH #upstream-fixes] sata_mv fix MSI irq race condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a (rare) race condition in mv_interrupt() when using MSI.

The value of hpriv->main_irq_mask_addr can change on on the fly,
and without this patch we could end up writing back a stale copy
to the hardware.

Signed-off-by: Mark Lord <mlord@xxxxxxxxx>
--

** This is required for 2.6.29 and beyond ***

--- old/drivers/ata/sata_mv.c	2009-03-10 16:19:39.000000000 -0400
+++ new/drivers/ata/sata_mv.c	2009-03-10 16:21:29.000000000 -0400
@@ -2218,12 +2218,13 @@
		else
			handled = mv_host_intr(host, pending_irqs);
	}
-	spin_unlock(&host->lock);

	/* for MSI: unmask; interrupt cause bits will retrigger now */
	if (using_msi)
		writel(hpriv->main_irq_mask, hpriv->main_irq_mask_addr);

+	spin_unlock(&host->lock);
+
	return IRQ_RETVAL(handled);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux