summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2016-06-17 15:22:15 +0300
committerBob Peterson <rpeterso@redhat.com>2016-06-17 16:35:03 +0300
commit1e875f5a95a28b5286165db9fa832b0773657ddb (patch)
treece81c0e518c2256111b2f6cc8e2a5f50741d781a /fs/gfs2
parent36e4ad0316c017d5b271378ed9a1c9a4b77fab5f (diff)
downloadlinux-1e875f5a95a28b5286165db9fa832b0773657ddb.tar.xz
gfs2: Initialize iopen glock holder for new inodes
In gfs2_init_inode_once, initialize inode->i_iopen_gh.gh_gl to NULL: otherwise, when gfs2_inode_lookup fails, the iopen glock holder can remain unset and iget_failed can end up accessing random memory. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index f99f8e94de3f..615f67581cc2 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -45,6 +45,7 @@ static void gfs2_init_inode_once(void *foo)
memset(&ip->i_res, 0, sizeof(ip->i_res));
RB_CLEAR_NODE(&ip->i_res.rs_node);
ip->i_hash_cache = NULL;
+ ip->i_iopen_gh.gh_gl = NULL;
}
static void gfs2_init_glock_once(void *foo)