Bug #3995
closedMemory leak of compressed buffers in l2arc_write_done
100%
Description
jimmyH from the ZFS on Linux project recently pointed out a memory leak in the l2arc_write_done code. The memory leak happens if we compressed a buffer and so b_tmp_cdata contains a memory buffer holding the compressed buffer representation, but if for reason the ARC hash lock acquisition in l2arc_write_done misses out, we won't ever release this. Release of the compressed buffer should be done prior to hash lock acquisition, since reading the contents of b_l2hdr is always safe for us (because the buffer had been scheduled for L2ARC writing).
Updated by Sašo Kiselkov almost 10 years ago
Webrev at http://cr.illumos.org/~webrev/skiselkov/3995/ awaiting review.
Updated by Garrett D'Amore over 9 years ago
- Category set to zfs - Zettabyte File System
- Status changed from New to Resolved
- % Done changed from 90 to 100
- Tags deleted (
needs-triage)
Integrated in:
commit 71cb1b742ca23532b844b6538d8f0997a900c62e
Author: Saso Kiselkov <skiselkov.ml@gmail.com>
Date: Fri Jan 17 10:13:26 2014 -0800
3995 Memory leak of compressed buffers in l2arc_write_done
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Garrett D'Amore <garrett@damore.org>