WSL2-Linux-Kernel/fs/gfs2
Hillf Danton 1ab19c5de4 gfs2: Fix use-after-free in gfs2_glock_shrink_scan
The GLF_LRU flag is checked under lru_lock in gfs2_glock_remove_from_lru() to
remove the glock from the lru list in __gfs2_glock_put().

On the shrink scan path, the same flag is cleared under lru_lock but because
of cond_resched_lock(&lru_lock) in gfs2_dispose_glock_lru(), progress on the
put side can be made without deleting the glock from the lru list.

Keep GLF_LRU across the race window opened by cond_resched_lock(&lru_lock) to
ensure correct behavior on both sides - clear GLF_LRU after list_del under
lru_lock.

Reported-by: syzbot <syzbot+34ba7ddbf3021981a228@syzkaller.appspotmail.com>
Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2021-05-31 12:03:28 +02:00
..
Kconfig
Makefile
acl.c fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
acl.h fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
aops.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
aops.h
bmap.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
bmap.h gfs2: Replace gfs2_lblk_to_dblk with gfs2_get_extent 2021-04-03 21:38:12 +02:00
dentry.c
dir.c gfs2: Turn gfs2_extent_map into gfs2_{get,alloc}_extent 2021-04-03 21:38:11 +02:00
dir.h
export.c
file.c gfs2: Fix mmap locking for write faults 2021-05-21 05:16:38 +02:00
gfs2.h
glock.c gfs2: Fix use-after-free in gfs2_glock_shrink_scan 2021-05-31 12:03:28 +02:00
glock.h gfs2: Allow node-wide exclusive glock sharing 2021-02-17 19:30:28 +01:00
glops.c gfs2: Fix I_NEW check in gfs2_dinode_in 2021-05-20 13:31:37 +02:00
glops.h gfs2: Split up gfs2_meta_sync into inode and rgrp versions 2020-10-29 22:16:46 +01:00
incore.h gfs2: Remove unused variable sb_format 2021-04-03 21:38:11 +02:00
inode.c Changes in gfs2: 2021-04-29 10:33:35 -07:00
inode.h Changes in gfs2: 2021-04-29 10:33:35 -07:00
lock_dlm.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
log.c gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
log.h gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
lops.c gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
lops.h gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
main.c gfs2: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache 2021-01-22 12:19:17 -05:00
meta_io.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
meta_io.h gfs2: Turn gfs2_meta_indirect_buffer into gfs2_meta_buffer 2021-04-03 21:38:12 +02:00
ops_fstype.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
quota.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
quota.h
recovery.c gfs2: Fix fall-through warnings for Clang 2021-04-20 22:38:21 +02:00
recovery.h
rgrp.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
rgrp.h gfs2: Add local resource group locking 2021-02-17 19:30:28 +01:00
super.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
super.h gfs2: make function gfs2_make_fs_ro() to void type 2021-03-07 17:04:55 +01:00
sys.c gfs2: Add new sysfs file for gfs2 status 2021-04-08 15:07:21 +02:00
sys.h
trace_gfs2.h gfs2: Add per-reservation reserved block accounting 2021-02-17 19:30:26 +01:00
trans.c gfs2: fix use-after-free in trans_drain 2021-03-07 17:04:55 +01:00
trans.h Merge branches 'rgrp-glock-sharing' and 'gfs2-revoke' from https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 2021-02-23 18:54:22 +01:00
util.c gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
util.h gfs2: Add common helper for holding and releasing the freeze glock 2020-12-23 00:54:13 +01:00
xattr.c gfs2: Fix a number of kernel-doc warnings 2021-04-09 22:14:13 +02:00
xattr.h