Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 10:32:03 +0000 (UTC)
From:      Sergey Kandaurov <pluknet@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: r230498 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201201241032.q0OAW30F069136@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pluknet
Date: Tue Jan 24 10:32:02 2012
New Revision: 230498
URL: http://svn.freebsd.org/changeset/base/230498

Log:
  MFC r230256:
   Fix the "lock &zrl->zr_mtx already initialized" assertion by initializing
   the allocated memory before calling mtx_init(9) on mtx pointing to it.
   Otherwize, random contents of uninitialized memory might occasionally
   trigger the assertion.
  
   Reported by:  Pavel Polyakov <bsd kobyla org>
   Reviewed by:  pjd

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Tue Jan 24 10:28:19 2012	(r230497)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Tue Jan 24 10:32:02 2012	(r230498)
@@ -1077,7 +1077,7 @@ dnode_hold_impl(objset_t *os, uint64_t o
 	if (children_dnodes == NULL) {
 		int i;
 		dnode_children_t *winner;
-		children_dnodes = kmem_alloc(sizeof (dnode_children_t) +
+		children_dnodes = kmem_zalloc(sizeof (dnode_children_t) +
 		    (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP);
 		children_dnodes->dnc_count = epb;
 		dnh = &children_dnodes->dnc_children[0];



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