lock order reversal

Jan-Espen Pettersen sigsegv at leakingmemory.org
Wed Apr 30 07:33:53 PDT 2003


On Wednesday 30 April 2003 14:55, Georg Funk wrote:
> Hi!
> I'm running the FreeBSD 5.0-RELEASE. When I boot up, this appears:
>
> 1st 0xc12a7230 process lock (process lock) @
> ../../../kern/kern_descrip.c:2112 lock order reversal
> I haven't noticed any disfunctions, but what does this mean?
>
> I get a similar error when I use my soundcard:
>
> lock order reversal
>  1st 0xc120a680 pcm0 (sound softc) @ ../../../dev/sound/isa/mss.c:177
>  2nd 0xc120a740 pcm0:play:0 (pcm channel) @
> ../../../dev/sound/pcm/channel.c:441
>
> I have to restart the KDE artsd before the soundcard works correct. Please
> give me advice how to solve this.
>
> Thanks in advance, Georg Funk

I have also seen that problem, and this patch seems to work here..
It is probably not very optimized, but the lock order reversal didn't show up again...

cvs diff: Diffing sys/dev/sound/pcm
Index: sys/dev/sound/pcm/dsp.c
===================================================================
RCS file: /old/pub/FreeBSD/development/FreeBSD-CVS/src/sys/dev/sound/pcm/dsp.c,v
retrieving revision 1.62
diff -r1.62 dsp.c
265,266c265
<       pcm_unlock(d);
<       /* finished with snddev, new channels still locked */
---
>       /* keep the snddev lock to avoid a lock order reversal, new channels still locked */
271d269
<                       pcm_lock(d);
289d286
<                       pcm_lock(d);
306a304
>       pcm_unlock(d);

Regards,
Jan-Espen Pettersen




More information about the freebsd-current mailing list