diff options
author | jhb <jhb@FreeBSD.org> | 2009-01-26 14:12:12 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-01-26 14:12:12 +0000 |
commit | 3b0fbe380002ff733e00cb220d235c309d47edae (patch) | |
tree | ae123cc6fa64951c12e5bb2d22e50499ba494538 /sys/dev/ppbus/ppbconf.c | |
parent | a9074e77b8d04e6644c56537bd7e2dabad938e40 (diff) | |
download | FreeBSD-src-3b0fbe380002ff733e00cb220d235c309d47edae.zip FreeBSD-src-3b0fbe380002ff733e00cb220d235c309d47edae.tar.gz |
Add missing locking around setting the ppc interrupt handler IVAR.
Reported by: many
Diffstat (limited to 'sys/dev/ppbus/ppbconf.c')
-rw-r--r-- | sys/dev/ppbus/ppbconf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ppbus/ppbconf.c b/sys/dev/ppbus/ppbconf.c index a3617be..a994355 100644 --- a/sys/dev/ppbus/ppbconf.c +++ b/sys/dev/ppbus/ppbconf.c @@ -393,8 +393,10 @@ ppbus_attach(device_t dev) ppb->ppc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); if (ppb->ppc_irq_res != NULL) { + mtx_lock(ppb->ppc_lock); error = BUS_WRITE_IVAR(device_get_parent(dev), dev, PPC_IVAR_INTR_HANDLER, (uintptr_t)&ppbus_intr); + mtx_unlock(ppb->ppc_lock); if (error) { device_printf(dev, "Unable to set interrupt handler\n"); return (error); |