[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2375c9f90909162255i3dca34e8w51e496294bb38916@mail.gmail.com>
Date: Thu, 17 Sep 2009 13:55:20 +0800
From: Américo Wang <xiyou.wangcong@...il.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/3][mmotm] kcore: more fixes for init
On Thu, Sep 17, 2009 at 10:42 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@...fujitsu.com> wrote:
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>
> proc_kcore_init() doesn't check NULL case.
> fix it and remove unnecessary comments.
>
> Cc: WANG Cong <xiyou.wangcong@...il.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Acked-by: WANG Cong <xiyou.wangcong@...il.com>
Thanks.
> ---
> fs/proc/kcore.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Index: mmotm-2.6.31-Sep14/fs/proc/kcore.c
> ===================================================================
> --- mmotm-2.6.31-Sep14.orig/fs/proc/kcore.c
> +++ mmotm-2.6.31-Sep14/fs/proc/kcore.c
> @@ -606,6 +606,10 @@ static int __init proc_kcore_init(void)
> {
> proc_root_kcore = proc_create("kcore", S_IRUSR, NULL,
> &proc_kcore_operations);
> + if (!proc_root_kcore) {
> + printk(KERN_ERR "couldn't create /proc/kcore\n");
> + return 0; /* Always returns 0. */
> + }
> /* Store text area if it's special */
> proc_kcore_text_init();
> /* Store vmalloc area */
> @@ -615,7 +619,6 @@ static int __init proc_kcore_init(void)
> /* Store direct-map area from physical memory map */
> kcore_update_ram();
> hotplug_memory_notifier(kcore_callback, 0);
> - /* Other special area, area-for-module etc is arch specific. */
>
> return 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