Matthew Dillon wrote:
Fix issues with spinlocks being held through blocking conditions (because DragonFly spinlocks aren't FreeBSD mutexes) by replacing the spinlocks with lockmgr locks.
I'm afraid this breaks more than it fixes. I get panics on module unload with this. What I guess happens is this: 1. detach() called 2. obtains lock 3. interrupt arrives 4. tries to obtain lock, sleeps (stupid for intr) 5. removes interrupt 6. releases lock 7. destroys lock 8. unloads module 9. wakes up 10. tries to obtain lock (other lock or so) 11. panic, lock in invalid state: mixer: ops removed dsp(30)[000000ff/00000003]: Warning: dev_ops_remove() called while 10 device refs still exist! dsp(30)[000000ff/00000005]: Warning: dev_ops_remove() called while 6 device refs still exist! dsp(30)[000000ff/00010003]: Warning: dev_ops_remove() called while 5 device refs still exist! dsp(30)[000000ff/00010005]: Warning: dev_ops_remove() called while 4 device refs still exist! dsp(30)[000000ff/0001000b]: Warning: dev_ops_remove() called while 3 device refs still exist! dsp(30)[000000ff/00020003]: Warning: dev_ops_remove() called while 2 device refs still exist! dsp(30)[000000ff/00020005]: Warning: dev_ops_remove() called while 1 device refs still exist! pcm0: detached panic: lockmgr: non-zero exclusive count how do freebsd deal with this sleeping thing? I have to review the code, maybe they only access one "hardware" lock, then we should use serializers for this. cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
signature.asc
Description: OpenPGP digital signature
