kernel-fxtec-pro1x/fs/gfs2
Bob Peterson 19709adfd7 gfs2: clean up iopen glock mess in gfs2_create_inode
[ Upstream commit 2c47c1be51fbded1f7baa2ceaed90f97932f79be ]

Before this patch, gfs2_create_inode had a use-after-free for the
iopen glock in some error paths because it did this:

	gfs2_glock_put(io_gl);
fail_gunlock2:
	if (io_gl)
		clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags);

In some cases, the io_gl was used for create and only had one
reference, so the glock might be freed before the clear_bit().
This patch tries to straighten it out by only jumping to the
error paths where iopen is properly set, and moving the
gfs2_glock_put after the clear_bit.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:14:28 +02:00
..
acl.c
acl.h
aops.c
aops.h
bmap.c
bmap.h
dentry.c
dir.c
dir.h
export.c
file.c
gfs2.h
glock.c Revert "gfs2: Don't demote a glock until its revokes are written" 2020-05-27 17:37:42 +02:00
glock.h
glops.c gfs2: initialize transaction tr_ailX_lists earlier 2020-09-23 12:10:56 +02:00
glops.h
incore.h
inode.c gfs2: clean up iopen glock mess in gfs2_create_inode 2020-10-01 13:14:28 +02:00
inode.h
Kconfig
lock_dlm.c
log.c gfs2: initialize transaction tr_ailX_lists earlier 2020-09-23 12:10:56 +02:00
log.h
lops.c
lops.h
main.c
Makefile
meta_io.c
meta_io.h
ops_fstype.c gfs2: read-only mounts should grab the sd_freeze_gl glock 2020-07-22 09:32:01 +02:00
quota.c gfs2: move privileged user check to gfs2_quota_lock_check 2020-06-03 08:19:28 +02:00
quota.h gfs2: move privileged user check to gfs2_quota_lock_check 2020-06-03 08:19:28 +02:00
recovery.c
recovery.h
rgrp.c
rgrp.h
super.c
super.h
sys.c
sys.h
trace_gfs2.h
trans.c gfs2: initialize transaction tr_ailX_lists earlier 2020-09-23 12:10:56 +02:00
trans.h
util.c
util.h
xattr.c
xattr.h