Project

General

Profile

Actions

Bug #3995

closed

Memory leak of compressed buffers in l2arc_write_done

Added by Sašo Kiselkov almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2013-08-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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).

Actions

Also available in: Atom PDF