diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 04:02:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:22 -0400 |
commit | a95609cb0283a23e519e607ff9fc2a4aa77e2532 (patch) | |
tree | 053d411aa27dafead6326a70d0ca3482bd2d0494 /drivers/net/pppol2tp.c | |
parent | cf7acfab032ff262f42954328cdfd20a5d9aaaac (diff) |
netdev: 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: Jeff Garzik <jgarzik@pobox.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/pppol2tp.c')
-rw-r--r-- | drivers/net/pppol2tp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index 3d10ca050b79..244d7830c92a 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -2469,12 +2469,12 @@ static int __init pppol2tp_init(void) | |||
2469 | goto out_unregister_pppol2tp_proto; | 2469 | goto out_unregister_pppol2tp_proto; |
2470 | 2470 | ||
2471 | #ifdef CONFIG_PROC_FS | 2471 | #ifdef CONFIG_PROC_FS |
2472 | pppol2tp_proc = create_proc_entry("pppol2tp", 0, init_net.proc_net); | 2472 | pppol2tp_proc = proc_net_fops_create(&init_net, "pppol2tp", 0, |
2473 | &pppol2tp_proc_fops); | ||
2473 | if (!pppol2tp_proc) { | 2474 | if (!pppol2tp_proc) { |
2474 | err = -ENOMEM; | 2475 | err = -ENOMEM; |
2475 | goto out_unregister_pppox_proto; | 2476 | goto out_unregister_pppox_proto; |
2476 | } | 2477 | } |
2477 | pppol2tp_proc->proc_fops = &pppol2tp_proc_fops; | ||
2478 | #endif /* CONFIG_PROC_FS */ | 2478 | #endif /* CONFIG_PROC_FS */ |
2479 | printk(KERN_INFO "PPPoL2TP kernel driver, %s\n", | 2479 | printk(KERN_INFO "PPPoL2TP kernel driver, %s\n", |
2480 | PPPOL2TP_DRV_VERSION); | 2480 | PPPOL2TP_DRV_VERSION); |