Skip to contentSkip to conversation

HSMMC: mmc_omap_irq: Do not expect cmd/data to be non-null when CC/TC occurs

PATCH In review Adrian Hunter 2 participants 2 messages Apr 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HSMMC: mmc_omap_irq: Do not expect cmd/data to be non-null when CC/TC occurs

From: Jarkko Lavinen <[email protected]>

With spurious interrupt cmd can be null even when we have CC set in irq status.

Fixes NB#106295 - prevent potential kernel crash in the MMC driver

---
drivers/mmc/host/omap_hsmmc.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/omap_hsmmc.c +0 -0
index d183be6..0268992 100644
@@ -490,7 +490,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
 
	OMAP_HSMMC_WRITE(host->base, STAT, status);
-	if (end_cmd || (status & CC))
+	if (end_cmd || ((status & CC) && host->cmd))
		mmc_omap_cmd_done(host, host->cmd);
	if (end_trans || (status & TC))
		mmc_omap_xfer_done(host, data);
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 10 lines · On Wed, 08 Apr 2009 11:18:32 +0300 Adrian Hunter <[email protected]>…

From: Jarkko Lavinen <[email protected]>

With spurious interrupt cmd can be null even when we have CC set in irq status.

Fixes NB#106295 - prevent potential kernel crash in the MMC driver

---

Queued.

Signature · 10 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org
  TigerVNC, core developer          http://www.tigervnc.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.