Date: Tue, 14 Feb 2012 09:19:30 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r231647 - head/sys/dev/sound/pcm Message-ID: <201202140919.q1E9JUPm088201@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Feb 14 09:19:30 2012 New Revision: 231647 URL: http://svn.freebsd.org/changeset/base/231647 Log: 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. MFC after: 3 days Modified: head/sys/dev/sound/pcm/sound.c Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Tue Feb 14 09:12:08 2012 (r231646) +++ head/sys/dev/sound/pcm/sound.c Tue Feb 14 09:19:30 2012 (r231647) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202140919.q1E9JUPm088201>