1
0
Fork 0
alistair23-linux/fs/ext4
Jan Kara 62f4e8015e ext4: fix leak of quota reservations
commit f4c2d372b8 upstream.

Commit 8fcc3a5806 ("ext4: rework reserved cluster accounting when
invalidating pages") moved freeing of delayed allocation reservations
from dirty page invalidation time to time when we evict corresponding
status extent from extent status tree. For inodes which don't have any
blocks allocated this may actually happen only in ext4_clear_blocks()
which is after we've dropped references to quota structures from the
inode. Thus reservation of quota leaked. Fix the problem by clearing
quota information from the inode only after evicting extent status tree
in ext4_clear_inode().

Link: https://lore.kernel.org/r/20191108115420.GI20863@quack2.suse.cz
Reported-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 8fcc3a5806 ("ext4: rework reserved cluster accounting when invalidating pages")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 19:56:53 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
acl.c ext4: compare old and new mode before setting update_mode flag 2018-12-10 00:22:38 -05:00
acl.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
balloc.c ext4: clean up kerneldoc warnigns when building with W=1 2019-06-19 16:30:03 -04:00
bitmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block_validity.c ext4: fix potential use after free after remounting with noblock_validity 2019-08-28 11:13:24 -04:00
dir.c ext4: fix kernel oops caused by spurious casefold flag 2019-09-03 01:43:17 -04:00
ext4.h Added new ext4 debugging ioctls to allow userspace to get information 2019-09-21 13:37:39 -07:00
ext4_extents.h ext4: adjust reserved cluster count when removing extents 2018-10-01 14:25:08 -04:00
ext4_jbd2.c ext4: shutdown should not prevent get_write_access 2018-02-18 22:07:36 -05:00
ext4_jbd2.h ext4: use jbd2_inode dirty range scoping 2019-06-20 17:26:26 -04:00
extents.c ext4: fix warning inside ext4_convert_unwritten_extents_endio 2019-08-22 22:53:46 -04:00
extents_status.c ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
extents_status.h ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
file.c Added new ext4 debugging ioctls to allow userspace to get information 2019-09-21 13:37:39 -07:00
fsmap.c ext4: fix miscellaneous sparse warnings 2019-05-12 04:49:47 -04:00
fsmap.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
fsync.c Revert "ext4: use ext4_write_inode() when fsyncing w/o a journal" 2019-01-31 23:41:11 -05:00
hash.c ext4: fix kernel oops caused by spurious casefold flag 2019-09-03 01:43:17 -04:00
ialloc.c ext4: fix leak of quota reservations 2019-12-17 19:56:53 +01:00
indirect.c ext4: clean up kerneldoc warnigns when building with W=1 2019-06-19 16:30:03 -04:00
inline.c ext4: set error return correctly when ext4_htree_store_dirent fails 2019-08-12 14:29:38 -04:00
inode.c ext4: fix a bug in ext4_wait_for_tail_page_commit 2019-12-17 19:56:53 +01:00
ioctl.c Added new ext4 debugging ioctls to allow userspace to get information 2019-09-21 13:37:39 -07:00
mballoc.c ext4: clean up kerneldoc warnigns when building with W=1 2019-06-19 16:30:03 -04:00
mballoc.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
migrate.c ext4: clean up indentation issues, remove extraneous tabs 2018-12-04 00:16:44 -05:00
mmp.c ext4: don't mark mmp buffer head dirty 2018-09-15 17:11:25 -04:00
move_extent.c ext4: use jbd2_inode dirty range scoping 2019-06-20 17:26:26 -04:00
namei.c ext4: work around deleting a file with i_nlink == 0 safely 2019-12-17 19:56:49 +01:00
page-io.c for-linus-20190715 2019-07-15 21:20:52 -07:00
readpage.c ext4: add fs-verity read support 2019-08-12 19:33:51 -07:00
resize.c Add as a feature case-insensitive directories (the casefold feature) 2019-05-07 21:12:44 -07:00
super.c ext4: fix leak of quota reservations 2019-12-17 19:56:53 +01:00
symlink.c ext4: switch to fscrypt_get_symlink() 2018-01-11 22:10:40 -05:00
sysfs.c ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
truncate.h ext4: handle layout changes to pinned DAX mappings 2018-07-29 17:00:22 -04:00
verity.c ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
xattr.c ext4: ignore e_value_offs for xattrs with value-in-ea-inode 2019-04-10 00:37:36 -04:00
xattr.h ext4: add extra checks to ext4_xattr_block_get() 2018-03-30 20:04:11 -04:00
xattr_security.c ext4: use XATTR_CREATE in ext4_initxattrs() 2018-05-10 11:52:14 -04:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00