if_dc.c locking patch

2003-01-06 Thread Nate Lawson
Attached is a diff that fixes a could sleep problem where ether_ifattach() does a malloc and dc(4) is holding a lock in its softc. It uses a cleaner exit strategy with only one call to DC_UNLOCK and no multiple return statements as well as fixing one place where error wasn't set. If people are

Re: if_dc.c locking patch

2003-01-06 Thread Maxime Henrion
Nate Lawson wrote: Attached is a diff that fixes a could sleep problem where ether_ifattach() does a malloc and dc(4) is holding a lock in its softc. It uses a cleaner exit strategy with only one call to DC_UNLOCK and no multiple return statements as well as fixing one place where error

Re: if_dc.c locking patch

2003-01-06 Thread Nate Lawson
On Mon, 6 Jan 2003, Maxime Henrion wrote: Nate Lawson wrote: Attached is a diff that fixes a could sleep problem where ether_ifattach() does a malloc and dc(4) is holding a lock in its softc. It uses a cleaner exit strategy with only one call to DC_UNLOCK and no multiple return

Re: if_dc.c locking patch

2003-01-06 Thread M. Warner Losh
Wouldn't it be better if you didn't do the bogus locking in the attach routine? It would be better to not lock at all and not initialize the ISR until last. That's what I did with if_rl. Let's not work around the bogus locking, but insteal eliminate it. There's no way that the driver can