Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2012 14:30:04 +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-9@freebsd.org
Subject:   svn commit: r231762 - stable/9/sys/dev/sound/pcm
Message-ID:  <201202151430.q1FEU4D0066077@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202151430.q1FEU4D0066077>