svn commit: r288064 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Mon Sep 21 12:23:02 UTC 2015
Author: avg
Date: Mon Sep 21 12:23:01 2015
New Revision: 288064
URL: https://svnweb.freebsd.org/changeset/base/288064
Log:
MFV r287817: 6220 memleak in l2arc on debug build
https://github.com/illumos/illumos-gate/commit/c546f36aa898d913ff77674fb5ff97f15b2e08b4
https://www.illumos.org/issues/6220
5408 introduced a memleak in l2arc, namely the member b_thawed gets leaked when
an arc_hdr is realloced from full to l2only.
Reviewed by: Saso Kiselkov <saso.kiselkov at nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert at gmail.com>
Reviewed by: George Wilson <george at delphix.com>
Approved by: Robert Mustacchi <rm at joyent.com>
Author: Arne Jansen <sensille at gmx.net>
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Directory Properties:
head/sys/cddl/contrib/opensolaris/ (props changed)
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Sep 21 12:00:12 2015 (r288063)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Sep 21 12:23:01 2015 (r288064)
@@ -1485,6 +1485,13 @@ arc_hdr_realloc(arc_buf_hdr_t *hdr, kmem
VERIFY(!HDR_L2_WRITING(hdr));
VERIFY3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL);
+#ifdef ZFS_DEBUG
+ if (hdr->b_l1hdr.b_thawed != NULL) {
+ kmem_free(hdr->b_l1hdr.b_thawed, 1);
+ hdr->b_l1hdr.b_thawed = NULL;
+ }
+#endif
+
nhdr->b_flags &= ~ARC_FLAG_HAS_L1HDR;
}
/*
More information about the svn-src-all
mailing list