]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: raid56: fix memory leak of btrfs_raid_bio::stripe_uptodate_bitmap
authorFilipe Manana <fdmanana@suse.com>
Fri, 30 Jan 2026 17:06:45 +0000 (17:06 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 05:37:29 +0000 (06:37 +0100)
commit29fb415a6a72c9207d118dd0a7a37184a14a3680
tree5c20cbf8aa269ff319fbb9060689688fc0f515c3
parent0d0f1314e8f86f5205f71f9e31e272a1d008e40b
btrfs: raid56: fix memory leak of btrfs_raid_bio::stripe_uptodate_bitmap

We allocate the bitmap but we never free it in free_raid_bio_pointers().
Fix this by adding a bitmap_free() call against the stripe_uptodate_bitmap
of a raid bio.

Fixes: 1810350b04ef ("btrfs: raid56: move sector_ptr::uptodate into a dedicated bitmap")
Reported-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/linux-btrfs/20260126045315.GA31641@lst.de/
Reviewed-by: Qu Wenruo <wqu@suse.com>
Tested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c