]> git.karo-electronics.de Git - karo-tx-linux.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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 25 Jul 2012 03:11:14 +0000 (04:11 +0100)
commit5eb695db655214b28a44040db35c43178541bcc8
treed0f7d56bf3fcea2fd4c49e35ac59eb3368ca1ad9
parent0906d248e8fddbd583fe4dd15631f4c2be2eb3b4
ocfs2: fix NULL pointer dereference in __ocfs2_change_file_space()

commit a4e08d001f2e50bb8b3c4eebadcf08e5535f02ee upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/ocfs2/file.c