diff options
author | Denis V. Lunev <den@openvz.org> | 2008-03-28 00:55:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-28 00:55:53 +0100 |
commit | 8eeee8b152ae6bbe181518efaf62ba8e9c613693 (patch) | |
tree | b5900762ddf2a5d03ed31da629b726c6fd6a710f /net/ipv6 | |
parent | [ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access (diff) | |
download | linux-8eeee8b152ae6bbe181518efaf62ba8e9c613693.tar.xz linux-8eeee8b152ae6bbe181518efaf62ba8e9c613693.zip |
[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.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index cc2f9afcf808..8d366f7f2a9a 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; } |