Messages in this thread | | | Date | Thu, 17 Sep 2009 13:55:20 +0800 | Subject | Re: [PATCH 1/3][mmotm] kcore: more fixes for init | From | Américo Wang <> |
| |
On Thu, Sep 17, 2009 at 10:42 AM, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > proc_kcore_init() doesn't check NULL case. > fix it and remove unnecessary comments. > > Cc: WANG Cong <xiyou.wangcong@gmail.com> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |