Re: [PATCH] btrfs: fix extent_state leak in btrfs_lock_and_flush_ordered_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 26, 2019 at 04:47:05PM +0900, Naohiro Aota wrote:
> btrfs_lock_and_flush_ordered_range() loads given "*cached_state" into
> cachedp, which, in general, is NULL. Then, lock_extent_bits() updates
> "cachedp", but it never goes backs to the caller. Thus the caller still
> see its "cached_state" to be NULL and never free the state allocated
> under btrfs_lock_and_flush_ordered_range(). As a result, we will
> see massive state leak with e.g. fstests btrfs/005. Fix this bug by
> properly handling the pointers.
> 
> Fixes: bd80d94efb83 ("btrfs: Always use a cached extent_state in btrfs_lock_and_flush_ordered_range")
> Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx>

Queued for 5.3, thanks.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux