https://github.com/torvalds/linux
Revision 6194ae4242dec0c9d604bc05df83aa9260a899e4 authored by Larry Chen on 02 November 2018, 22:48:27 UTC, committed by Linus Torvalds on 03 November 2018, 17:09:37 UTC
ocfs2_defrag_extent() might leak allocated clusters.  When the file
system has insufficient space, the number of claimed clusters might be
less than the caller wants.  If that happens, the original code might
directly commit the transaction without returning clusters.

This patch is based on code in ocfs2_add_clusters_in_btree().

[akpm@linux-foundation.org: include localalloc.h, reduce scope of data_ac]
Link: http://lkml.kernel.org/r/20180904041621.16874-3-lchen@suse.com
Signed-off-by: Larry Chen <lchen@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <ge.changwei@h3c.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3a3d1e5
History
Tip revision: 6194ae4242dec0c9d604bc05df83aa9260a899e4 authored by Larry Chen on 02 November 2018, 22:48:27 UTC
ocfs2: fix clusters leak in ocfs2_defrag_extent()
Tip revision: 6194ae4
File Mode Size
apparmor
integrity
keys
loadpin
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 9.8 KB
Makefile -rw-r--r-- 1.0 KB
commoncap.c -rw-r--r-- 39.0 KB
device_cgroup.c -rw-r--r-- 20.4 KB
inode.c -rw-r--r-- 10.5 KB
lsm_audit.c -rw-r--r-- 10.6 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 45.3 KB

back to top