cvs commit: src/sys/dev/sound/isa ad1816.c mss.c sbc.c src/sys/dev/sound/pci als4000.c atiixp.c aureal.c cmi.c ds1.c emu10k1.c envy24.c envy24ht.c es137x.c ich.c maestro.c maestro3.c solo.c spicds.c t4dwave.c via8233.c via82c686.c ...

Simon 'corecode' Schubert corecode at
Fri Jun 22 13:21:12 PDT 2007

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.

Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |      Against  HTML   \
Dude 2c 2 the max   !       Mail + News   / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00008.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <>

More information about the Commits mailing list