Date: Wed, 15 Feb 2012 14:31:46 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r231763 - stable/8/sys/dev/sound/pcm Message-ID: <201202151431.q1FEVkIF066183@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Feb 15 14:31:45 2012 New Revision: 231763 URL: http://svn.freebsd.org/changeset/base/231763 Log: MFC r231762: 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/8/sys/dev/sound/pcm/sound.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/sound/pcm/sound.c ============================================================================== --- stable/8/sys/dev/sound/pcm/sound.c Wed Feb 15 14:30:04 2012 (r231762) +++ stable/8/sys/dev/sound/pcm/sound.c Wed Feb 15 14:31:45 2012 (r231763) @@ -1397,7 +1397,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; @@ -1406,6 +1405,8 @@ sound_modevent(module_t mod, int type, v pcmsg_unrhdr = NULL; } break; + case MOD_SHUTDOWN: + break; default: ret = ENOTSUP; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202151431.q1FEVkIF066183>