diff options
| author | 2009-09-13 10:16:37 +0000 | |
|---|---|---|
| committer | 2009-09-13 10:16:37 +0000 | |
| commit | 787b456868d57fee7a02461f6b0dd85bc18b01e9 (patch) | |
| tree | d33959314815f88bf1278a33c2a2d8c77bed29b3 /sys/arch/macppc | |
| parent | Move some real noisy operations to a higher debug level. (diff) | |
| download | wireguard-openbsd-787b456868d57fee7a02461f6b0dd85bc18b01e9.tar.xz wireguard-openbsd-787b456868d57fee7a02461f6b0dd85bc18b01e9.zip | |
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/macppc')
| -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]]]; |
