summaryrefslogtreecommitdiffstats
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 10:02:31 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 17:06:22 +0200
commitc33fff0afbef4f0467c99e3f47ee7e98ae78c77e (patch)
treed6b5f8dc77aa21de95bbca76c6be6056026cc1d8 /kernel/kallsyms.c
parentisdn: use non-racy method for proc entries creation (diff)
downloadlinux-c33fff0afbef4f0467c99e3f47ee7e98ae78c77e.tar.xz
linux-c33fff0afbef4f0467c99e3f47ee7e98ae78c77e.zip
kernel: use non-racy method for proc entries creation
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r--kernel/kallsyms.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index f091d13def00..6fc0040f3e3a 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -472,11 +472,7 @@ static const struct file_operations kallsyms_operations = {
static int __init kallsyms_init(void)
{
- struct proc_dir_entry *entry;
-
- entry = create_proc_entry("kallsyms", 0444, NULL);
- if (entry)
- entry->proc_fops = &kallsyms_operations;
+ proc_create("kallsyms", 0444, NULL, &kallsyms_operations);
return 0;
}
__initcall(kallsyms_init);