Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 10:28:20 +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-9@freebsd.org
Subject:   svn commit: r230497 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201201241028.q0OASKPY068964@svn.freebsd.org>

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

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/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Tue Jan 24 09:51:42 2012	(r230496)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Tue Jan 24 10:28:19 2012	(r230497)
@@ -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?201201241028.q0OASKPY068964>