summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-27 16:55:53 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-27 16:55:53 -0700
commit8eeee8b152ae6bbe181518efaf62ba8e9c613693 (patch)
treeb5900762ddf2a5d03ed31da629b726c6fd6a710f /net/ipv6
parent920fc941a9617f95ccb283037fe6f8a38d95bb69 (diff)
downloadop-kernel-dev-8eeee8b152ae6bbe181518efaf62ba8e9c613693.zip
op-kernel-dev-8eeee8b152ae6bbe181518efaf62ba8e9c613693.tar.gz
[NETFILTER]: Replate direct proc_fops assignment with proc_create call.
This elliminates infamous race during module loading when one could lookup proc entry without proc_fops assigned. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_queue.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index cc2f9af..8d366f7 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -591,11 +591,9 @@ static int __init ip6_queue_init(void)
}
#ifdef CONFIG_PROC_FS
- proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net);
- if (proc) {
- proc->owner = THIS_MODULE;
- proc->proc_fops = &ip6_queue_proc_fops;
- } else {
+ proc = proc_create(IPQ_PROC_FS_NAME, 0, init_net.proc_net,
+ &ip6_queue_proc_fops);
+ if (!proc) {
printk(KERN_ERR "ip6_queue: failed to create proc entry\n");
goto cleanup_ipqnl;
}
OpenPOWER on IntegriCloud