diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-09-13 10:16:38 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-09-13 10:16:38 +0000 |
commit | e3d153a61283ff17c655815b9d6a405db2c9afa6 (patch) | |
tree | d8862c353edbf191a6d0e63b834f97c2ce1e753b /sys/arch | |
parent | a044a88f5590364e0280b4caec055622827b4e19 (diff) |
Make sure we really have pending interrupts such that we don't do an
out-of-bounds array access later on.
ok drahn@, dms@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/macppc/dev/openpic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c index 7bbacad8110..ba932209747 100644 --- a/sys/arch/macppc/dev/openpic.c +++ b/sys/arch/macppc/dev/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.55 2009/08/22 02:54:50 mk Exp $ */ +/* $OpenBSD: openpic.c,v 1.56 2009/09/13 10:16:37 kettenis Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -487,6 +487,8 @@ openpic_do_pending_int() /* this still doesn't handle the interrupts in priority order */ for (pri = IPL_HIGH; pri >= IPL_NONE; pri--) { pripending = hwpend & ~imask[pri]; + if (pripending == 0) + continue; irq = 31 - cntlzw(pripending); ci->ci_ipending &= ~(1L << irq); ci->ci_cpl = imask[o_intrmaxlvl[o_hwirq[irq]]]; |