svn commit: r231762 - stable/9/sys/dev/sound/pcm
Alexander Motin
mav at FreeBSD.org
Wed Feb 15 14:30:05 UTC 2012
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;
}
More information about the svn-src-stable-9
mailing list