swh:1:snp:c3bf2749e3476071fa748f67b0ffa2fdc5fe49d9
Revision a3b46b86ca76d7f9d487e6a0b594fd1984e0796e authored by Naohiro Aota on 26 July 2019, 07:47:05 UTC, committed by David Sterba on 26 July 2019, 10:21:22 UTC
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")
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 6e7ca09
History
Tip revision: d1221cea11fca0f6946bdd032a45b22cecfc0f99 authored by Linus Torvalds on 13 September 2022, 13:11:38 UTC
Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Tip revision: d1221ce
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.6 KB
.mailmap -rw-r--r-- 12.0 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.2 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 563 bytes
MAINTAINERS -rw-r--r-- 500.4 KB
Makefile -rw-r--r-- 58.8 KB
README -rw-r--r-- 727 bytes

README

back to top