From f5ff6d6f34e2cab60722a8a2e8444436c969bfeb Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 22 Feb 2013 12:23:01 +0100 Subject: [PATCH] sdiahci: prevent nil pointer dereference on spurious interrupt status on some controllers, we get bogus interrupt indication for non present drives. ack the irq but ignore. --- sys/src/9/pc/sdiahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/9/pc/sdiahci.c b/sys/src/9/pc/sdiahci.c index 8db494b42..6657785df 100644 --- a/sys/src/9/pc/sdiahci.c +++ b/sys/src/9/pc/sdiahci.c @@ -1201,7 +1201,7 @@ iainterrupt(Ureg *u, void *a) cause &= ~m; d = c->rawdrive + i; ilock(d); - if(d->port->isr && c->hba->pi & m) + if(d->port != nil && d->port->isr && c->hba->pi & m) updatedrive(d); c->hba->isr = m; iunlock(d);