From 3aeb84ae71b5fb88507d852f056f51de25900aba Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Tue, 22 Sep 2009 16:45:50 -0700 Subject: [PATCH] --- yaml --- r: 164771 b: refs/heads/master c: 90396f96b7da0e2305ffe0266d22b6f8221f28ba h: refs/heads/master i: 164769: fe61b28195a953a692c8b57e0dfde93eb82d6408 164767: ba74105bd720c4bf3ca5b7d9d649d27c293f550f v: v3 --- [refs] | 2 +- trunk/fs/proc/kcore.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index f52039cf32a9..f8f70dcf043a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81ac3ad9061dd9cd490ee92f0c5316a14d77ce18 +refs/heads/master: 90396f96b7da0e2305ffe0266d22b6f8221f28ba diff --git a/trunk/fs/proc/kcore.c b/trunk/fs/proc/kcore.c index c6a5ec731972..70733780fdd9 100644 --- a/trunk/fs/proc/kcore.c +++ b/trunk/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; }