]> www.infradead.org Git - users/jedix/linux-maple.git/commit
[PATCH] ocfs2: fix NULL pointer dereference in ocfs2_duplicate_clusters_by_page v2
authorXiaowei.Hu <xiaowei.hu@oracle.com>
Wed, 10 Oct 2012 06:03:39 +0000 (14:03 +0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 12 Oct 2012 12:58:02 +0000 (05:58 -0700)
commitf482921301ee8df7010bf7d1637192e91d3dca6a
tree38d7739983b522e0a2601bb8bed7ff8b380a30e4
parent298bd5d0da5400e8b206b110bf39964b7f1c9a1b
[PATCH] ocfs2: fix NULL pointer dereference in ocfs2_duplicate_clusters_by_page v2

Orabug: 14752693
Since ocfs2_cow_file_pos will invoke ocfs2_refcount_cow with a NULL
as the struct file pointer, it finally result in a null pointer
dereference in ocfs2_duplicate_clusters_by_page.
This patch add checks of file pointer and parameter of inode pointer
in cow_duplicate_clusters to fix this issue.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
fs/ocfs2/move_extents.c
fs/ocfs2/refcounttree.c
fs/ocfs2/refcounttree.h