Author: kib
Date: Wed Jan 21 16:32:54 2015
New Revision: 277489
URL: https://svnweb.freebsd.org/changeset/base/277489

Log:
  Do not assert that the new pipepair mutex is not initialized.  The
  backing memory contains garbage and might trigger the assertion.
  
  Reported and tested by:       pho
  Sponsored by: The FreeBSD Foundation
  MFC after:    2 weeks

Modified:
  head/sys/kern/sys_pipe.c

Modified: head/sys/kern/sys_pipe.c
==============================================================================
--- head/sys/kern/sys_pipe.c    Wed Jan 21 16:13:37 2015        (r277488)
+++ head/sys/kern/sys_pipe.c    Wed Jan 21 16:32:54 2015        (r277489)
@@ -318,7 +318,7 @@ pipe_zone_init(void *mem, int size, int 
 
        pp = (struct pipepair *)mem;
 
-       mtx_init(&pp->pp_mtx, "pipe mutex", NULL, MTX_DEF);
+       mtx_init(&pp->pp_mtx, "pipe mutex", NULL, MTX_DEF | MTX_NEW);
        return (0);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to