All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][GIT PULL][v3.6] tracing: Don't call page_to_pfn() if page is NULL
@ 2012-09-20 22:03 Steven Rostedt
  2012-09-21  7:12 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2012-09-20 22:03 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, stable,
	Mel Gorman, Minchan Kim


Ingo,

I wrote a test that triggers the bug, and tested this patch which seems
to fix it as well.

Please pull the latest tip/perf/urgent tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/perf/urgent

Head SHA1: 85f2a2ef1d0ab99523e0b947a2b723f5650ed6aa


Wen Congyang (1):
      tracing: Don't call page_to_pfn() if page is NULL

----
 include/trace/events/kmem.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---------------------------
commit 85f2a2ef1d0ab99523e0b947a2b723f5650ed6aa
Author: Wen Congyang <wency@cn.fujitsu.com>
Date:   Thu Sep 20 14:04:47 2012 +0800

    tracing: Don't call page_to_pfn() if page is NULL
    
    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
    
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: stable <stable@vger.kernel.org>
    Acked-by: Mel Gorman <mel@csn.ul.ie>
    Reviewed-by: Minchan Kim <minchan@kernel.org>
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index 5f889f1..08fa272 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -214,7 +214,7 @@ TRACE_EVENT(mm_page_alloc,
 
 	TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s",
 		__entry->page,
-		page_to_pfn(__entry->page),
+		__entry->page ? page_to_pfn(__entry->page) : 0,
 		__entry->order,
 		__entry->migratetype,
 		show_gfp_flags(__entry->gfp_flags))
@@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(mm_page,
 
 	TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d",
 		__entry->page,
-		page_to_pfn(__entry->page),
+		__entry->page ? page_to_pfn(__entry->page) : 0,
 		__entry->order,
 		__entry->migratetype,
 		__entry->order == 0)



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][GIT PULL][v3.6] tracing: Don't call page_to_pfn() if page is NULL
  2012-09-20 22:03 [PATCH][GIT PULL][v3.6] tracing: Don't call page_to_pfn() if page is NULL Steven Rostedt
@ 2012-09-21  7:12 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2012-09-21  7:12 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Frederic Weisbecker, Andrew Morton, stable, Mel Gorman,
	Minchan Kim


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Ingo,
> 
> I wrote a test that triggers the bug, and tested this patch which seems
> to fix it as well.
> 
> Please pull the latest tip/perf/urgent tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> tip/perf/urgent
> 
> Head SHA1: 85f2a2ef1d0ab99523e0b947a2b723f5650ed6aa
> 
> 
> Wen Congyang (1):
>       tracing: Don't call page_to_pfn() if page is NULL
> 
> ----
>  include/trace/events/kmem.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Pulled, thanks Steve!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-21  7:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-20 22:03 [PATCH][GIT PULL][v3.6] tracing: Don't call page_to_pfn() if page is NULL Steven Rostedt
2012-09-21  7:12 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.