svn commit: r230256 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Sergey Kandaurov
pluknet at FreeBSD.org
Tue Jan 17 06:23:26 UTC 2012
Author: pluknet
Date: Tue Jan 17 06:23:25 2012
New Revision: 230256
URL: http://svn.freebsd.org/changeset/base/230256
Log:
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
MFC after: 1 week
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Jan 17 04:45:11 2012 (r230255)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Jan 17 06:23:25 2012 (r230256)
@@ -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];
More information about the svn-src-head
mailing list