Hello,

I've just experienced kernel panic while trying
to play mp3 file. (My sound card: Creative Sound
Blaster 16, ISA, worked fine on older 5.x system).

While reading code:

sys/dev/sound/pcm/sound.c::snd_mtxcreate() creates 
non-recursive mutex.

But in sys/dev/sound/isa/sb16.c::sb_setup() we have:

sb_setup()
{

        sb_lock(sb);

        /* ... */

        sb_reset_dsp(sb);

        /* ... */
}

sb_reset_dsp() function locks this mutex again, causing 
panic with message: 
_mtx_lock_sleep: recursed on non-recursive mutex sbc0 @...

Is this known issue? Why this mutex should be non-recursive?
Attached patch makes it work again.

best regards, bm.

FreeBSD 5.2-CURRENT FreeBSD Sat Mar 27 18:25:15 CET 2004
sbc0: <Creative ViBRA16C> at port 0x388-0x38b,0x330-0x331,0x220-0x22f
irq 5 drq 5,1 on isa0
sbc0: [GIANT-LOCKED]
pcm0: <SB16 DSP 4.13> on sbc0

--- sound.c     Sun May  9 10:44:20 2004
+++ sound.c     Sun May  9 10:48:31 2004
@@ -75,7 +75,7 @@
        m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | M_ZERO);
        if (m == NULL)
                return NULL;
-       mtx_init(m, desc, type, MTX_DEF);
+       mtx_init(m, desc, type, MTX_DEF | MTX_RECURSE);
        return m;
 #else
        return (void *)0xcafebabe;
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to