]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: Don't call page_to_pfn() if page is NULL
authorWen Congyang <wency@cn.fujitsu.com>
Thu, 20 Sep 2012 06:04:47 +0000 (14:04 +0800)
committerGuangyu Sun <guangyu.sun@oracle.com>
Mon, 8 Oct 2012 17:00:13 +0000 (10:00 -0700)
commit75fa2bf9765b34a62e8810f63782aa2c3356f138
tree3bcca3e2265bd2096c1c1a1e107a12c1df3e2bf5
parentc30af5feb4f209fdae0bd726cdd3af890e080688
tracing: Don't call page_to_pfn() if page is NULL

commit 85f2a2ef1d0ab99523e0b947a2b723f5650ed6aa upstream.

When allocating memory fails, page is NULL. page_to_pfn() will
cause the kernel panicked if we don't use sparsemem vmemmap.

Link: http://lkml.kernel.org/r/505AB1FF.8020104@cn.fujitsu.com
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
include/trace/events/kmem.h