tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Locking strategy for device deletion (also see PR kern/48536)



On Tue, Jun 07, 2016 at 06:28:11PM +0800, Paul Goyette wrote:
 > Can anyone suggest a reliable way to ensure that a device-driver module can
 > be _really_ safely detached?

There's a pserialize scheme for this; see e.g. an old thread called
"kicking everybody out of the softc".

The catch for arbitrary drivers is that you need to do the enter
business using the softc *before* using [cb]devsw to jump into the
driver, but the current way all of that works is the other way
around. This really needs to be restructured...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index