lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1348148904.13080.63.camel@gandalf.local.home>
Date:	Thu, 20 Sep 2012 09:48:24 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Wen Congyang <wency@...fujitsu.com>, Mel Gorman <mel@....ul.ie>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Minchan Kim <minchan@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	khlebnikov@...nvz.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] trace: don't call page_to_pfn() if page is NULL

Mel,

As you were the original author of this code, can I get your Acked-by?

Thanks,

-- Steve


On Thu, 2012-09-20 at 14:04 +0800, Wen Congyang wrote:
> When allocating memory fails, page is NULL. page_to_pfn() will
> cause the kernel panicked if we don't use sparsemem vmemmap.
> 
> Signed-off-by: Wen Congyang <wency@...fujitsu.com>
> 
> ---
>  include/trace/events/kmem.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> 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)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ