]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
GFS2: Fix use-after-free bug on umount
authorSteven Whitehouse <swhiteho@redhat.com>
Thu, 27 Nov 2008 08:27:28 +0000 (08:27 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 5 Jan 2009 07:39:14 +0000 (07:39 +0000)
commit3af165ac4d099385b12e3e75a9ee3ffd02da33e0
treeb90552f6ac8db316c05d5f3246366cfa09cc7473
parent2e204703a1161e9bae38ba0d3d0df04a679e6f4f
GFS2: Fix use-after-free bug on umount

There was a use-after-free with the GFS2 super block during
umount. This patch moves almost all of the umount code from
->put_super into ->kill_sb, the only bit that cannot be moved
being the glock hash clearing which has to remain as ->put_super
due to umount ordering requirements. As a result its now obvious
that the kfree is the final operation, whereas before it was
hidden in ->put_super.

Also gfs2_jindex_free is then only referenced from a single file
so thats moved and marked static too.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glock.c
fs/gfs2/glock.h
fs/gfs2/ops_fstype.c
fs/gfs2/ops_super.c
fs/gfs2/super.c
fs/gfs2/super.h