ceph: check PG_Private flag before accessing page->private
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 28 May 2012 06:44:30 +0000 (14:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:20 +0000 (11:38 -0800)
commite7fda85c9dab7396c5ed7345ab7c6fcdf4ffc366
tree4295dee66c02db5d5e4b56e1b9e60fe675b602e7
parent9923ad77a69ab565af2746262989cc0340943668
ceph: check PG_Private flag before accessing page->private

(cherry picked from commit 28c0254ede13ab575d2df5c6585ed3d4817c3e6b)

I got lots of NULL pointer dereference Oops when compiling kernel on ceph.
The bug is because the kernel page migration routine replaces some pages
in the page cache with new pages, these new pages' private can be non-zero.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/addr.c