[SRU] [Xenial] [PATCH 0/1] btrfs: fallocate: fix memory leak
Andrea Righi
andrea.righi at canonical.com
Wed Apr 3 12:38:57 UTC 2019
BugLink: https://bugs.launchpad.net/bugs/1822579
[Impact]
* If fallocate() is failing on a btrfs subvolume when its qgroup quota
limit exceeded, a previously allocated extent map isn't correctly
released, causing a memory leak from the pool btrfs_extent_map
* Fix by correctly deallocating the object in case of failure
[Test Case]
* https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1822579/+attachment/5252459/+files/btrfs-fallocate-test.sh
[Fix]
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be2d253cc98244765323a7c94cc1ac5cd5a17072
Fix the memory leak by adding the proper free_extent_map() call to the
failure path.
[Regression Potential]
* This is an upstream fix, tested on the affected platform. The patch
is really small, backport changes are minimal. All the other Ubuntu
releases are including this fix already.
Filipe Manana (1):
Btrfs: fix extent map leak during fallocate error path
fs/btrfs/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
More information about the kernel-team
mailing list