svn commit: r187714 - head/sys/dev/ppbus

John Baldwin jhb at FreeBSD.org
Mon Jan 26 06:12:13 PST 2009


Author: jhb
Date: Mon Jan 26 14:12:12 2009
New Revision: 187714
URL: http://svn.freebsd.org/changeset/base/187714

Log:
  Add missing locking around setting the ppc interrupt handler IVAR.
  
  Reported by:	    many

Modified:
  head/sys/dev/ppbus/ppbconf.c

Modified: head/sys/dev/ppbus/ppbconf.c
==============================================================================
--- head/sys/dev/ppbus/ppbconf.c	Mon Jan 26 14:03:39 2009	(r187713)
+++ head/sys/dev/ppbus/ppbconf.c	Mon Jan 26 14:12:12 2009	(r187714)
@@ -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);


More information about the svn-src-all mailing list