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

Christian Peron csjp at FreeBSD.org
Mon Jan 26 13:07:13 PST 2009


John

I think I found another issue relating to these changes.  The patch I have
attached fixes a panic on bootup in lpt.

Any objections?

On Mon, Jan 26, 2009 at 02:12:13PM +0000, John Baldwin wrote:
> 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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lpt.c.diff
Type: text/x-diff
Size: 391 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090126/fda849ab/lpt.c.bin


More information about the svn-src-all mailing list