mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 17:34:24 -04:00
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: 1810350b04 ("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>
This commit is contained in:
committed by
David Sterba
parent
5341c98450
commit
a56a70f8d2
@@ -150,6 +150,7 @@ static void scrub_rbio_work_locked(struct work_struct *work);
|
||||
static void free_raid_bio_pointers(struct btrfs_raid_bio *rbio)
|
||||
{
|
||||
bitmap_free(rbio->error_bitmap);
|
||||
bitmap_free(rbio->stripe_uptodate_bitmap);
|
||||
kfree(rbio->stripe_pages);
|
||||
kfree(rbio->bio_paddrs);
|
||||
kfree(rbio->stripe_paddrs);
|
||||
|
||||
Reference in New Issue
Block a user