]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ocfs2: fix NULL pointer dereference in __ocfs2_change_file_space()
authorLuis Henriques <luis.henriques@canonical.com>
Wed, 11 Jul 2012 21:02:10 +0000 (14:02 -0700)
committerXiaowei.Hu <xiaowei.hu@oracle.com>
Wed, 29 Aug 2012 06:11:13 +0000 (14:11 +0800)
commit02f34ff63e93aca62b6b8b830ef1c0048485110b
tree635e8987b028e9e0f4bab37a4300fc4cb823469d
parent3785e901e10764418991b7bb7f3a62023cbc10f0
ocfs2: fix NULL pointer dereference in __ocfs2_change_file_space()

As ocfs2_fallocate() will invoke __ocfs2_change_file_space() with a NULL
as the first parameter (file), it may trigger a NULL pointer dereferrence
due to a missing check.

Addresses http://bugs.launchpad.net/bugs/1006012

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Reported-by: Bret Towe <magnade@gmail.com>
Tested-by: Bret Towe <magnade@gmail.com>
Cc: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a4e08d001f2e50bb8b3c4eebadcf08e5535f02ee)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
fs/ocfs2/file.c