svn commit: r231762 - stable/9/sys/dev/sound/pcm

[ Available lists | Index of svn-src-all | Month of Feb 2012 | Week of 15 Feb 2012 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Alexander Motin <mav@FreeBSD.org>
Date
15 Feb 2012 14:30:04
Subject
svn commit: r231762 - stable/9/sys/dev/sound/pcm
Message-ID
201202151430.q1FEU4D0066077@svn.freebsd.org


[ Hide this part ]
Author: mav
Date: Wed Feb 15 14:30:04 2012
New Revision: 231762
URL: http://svn.freebsd.org/changeset/base/231762

Log:
MFC r231647:
Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

Modified:
stable/9/sys/dev/sound/pcm/sound.c
Directory Properties:
stable/9/sys/ (props changed)

Modified: stable/9/sys/dev/sound/pcm/sound.c
==============================================================================
--- stable/9/sys/dev/sound/pcm/sound.c Wed Feb 15 14:29:23 2012 (r231761)
+++ stable/9/sys/dev/sound/pcm/sound.c Wed Feb 15 14:30:04 2012 (r231762)
@@ -1415,7 +1415,6 @@ sound_modevent(module_t mod, int type, v
pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL);
break;
case MOD_UNLOAD:
- case MOD_SHUTDOWN:
ret = sndstat_acquire(curthread);
if (ret != 0)
break;
@@ -1424,6 +1423,8 @@ sound_modevent(module_t mod, int type, v
pcmsg_unrhdr = NULL;
}
break;
+ case MOD_SHUTDOWN:
+ break;
default:
ret = ENOTSUP;
}


Elapsed time: 0.106 seconds