exclusive sleep mutex pcm0 (sound cdev) r = 0

From: Jun Kuriyama <kuriyama_at_imgsrc.co.jp>
Date: Tue, 24 Feb 2004 12:43:34 +0900
I got this warning on my current box:

malloc() of "256" with the following non-sleepable locks held:
exclusive sleep mutex pcm0 (sound cdev) r = 0 (0xc73e63c0) locked _at_ dev/sound/pcm/dsp.c:213

I think there is no need to wait in vchan_create().  If kernel does
not have resources to return small 256 bytes memory for sound device,
we are not in the situation to care whether sound is played correctly
or not...


Index: vchan.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/vchan.c,v
retrieving revision 1.16
diff -u -r1.16 vchan.c
--- vchan.c	28 Jan 2004 08:02:15 -0000	1.16
+++ vchan.c	24 Feb 2004 03:35:19 -0000
_at__at_ -255,7 +255,7 _at__at_
 
    	CHN_UNLOCK(parent);
 
-	pce = malloc(sizeof(*pce), M_DEVBUF, M_WAITOK | M_ZERO);
+	pce = malloc(sizeof(*pce), M_DEVBUF, M_NOWAIT | M_ZERO);
 	if (!pce) {
    		CHN_LOCK(parent);
 		return ENOMEM;


-- 
Jun Kuriyama <kuriyama_at_imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama_at_FreeBSD.org> // FreeBSD Project
Received on Mon Feb 23 2004 - 18:43:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:44 UTC