diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 01:02:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 08:06:22 -0700 |
commit | a95609cb0283a23e519e607ff9fc2a4aa77e2532 (patch) | |
tree | 053d411aa27dafead6326a70d0ca3482bd2d0494 /drivers/net/pppoe.c | |
parent | cf7acfab032ff262f42954328cdfd20a5d9aaaac (diff) | |
download | op-kernel-dev-a95609cb0283a23e519e607ff9fc2a4aa77e2532.zip op-kernel-dev-a95609cb0283a23e519e607ff9fc2a4aa77e2532.tar.gz |
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/pppoe.c')
-rw-r--r-- | drivers/net/pppoe.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 4fad4dd..58a26a4 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -1052,11 +1052,9 @@ static int __init pppoe_proc_init(void) { struct proc_dir_entry *p; - p = create_proc_entry("pppoe", S_IRUGO, init_net.proc_net); + p = proc_net_fops_create(&init_net, "pppoe", S_IRUGO, &pppoe_seq_fops); if (!p) return -ENOMEM; - - p->proc_fops = &pppoe_seq_fops; return 0; } #else /* CONFIG_PROC_FS */ |