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;
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to