Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Btrfs: fix double free in find_lock_delalloc_range

We need to NULL the cached_state after freeing it, otherwise
we might free it again if find_delalloc_range doesn't find anything.

Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org

+1
+1
fs/btrfs/extent_io.c
··· 1693 1693 * shortening the size of the delalloc range we're searching 1694 1694 */ 1695 1695 free_extent_state(cached_state); 1696 + cached_state = NULL; 1696 1697 if (!loops) { 1697 1698 max_bytes = PAGE_CACHE_SIZE; 1698 1699 loops = 1;