]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix NULL pointer dereference in function ocfs2_abort_trigger()
authorXue jiufei <xuejiufei@huawei.com>
Wed, 24 Jun 2015 23:55:20 +0000 (16:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2015 00:49:39 +0000 (17:49 -0700)
commit03d22235aca303a1d56733063da5dbc68ac5e5b7
treefb2c14c51cf5c4d85252893e5a24ea2191ac19e4
parent526a8cffd2554598de54b4032db6a7cb30cb5bd6
ocfs2: fix NULL pointer dereference in function ocfs2_abort_trigger()

ocfs2_abort_trigger() use bh->b_assoc_map to get sb.  But there's no
function to set bh->b_assoc_map in ocfs2, it will trigger NULL pointer
dereference while calling this function.  We can get sb from
bh->b_bdev->bd_super instead of b_assoc_map.

[akpm@linux-foundation.org: update comment, per Joseph]
Signed-off-by: joyce.xue <xuejiufei@huawei.com>
Cc: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/journal.c