diff options
author | Denis V. Lunev | 2008-03-28 00:55:53 +0100 |
---|---|---|
committer | David S. Miller | 2008-03-28 00:55:53 +0100 |
commit | 8eeee8b152ae6bbe181518efaf62ba8e9c613693 (patch) | |
tree | b5900762ddf2a5d03ed31da629b726c6fd6a710f /net/ipv4/netfilter/ipt_CLUSTERIP.c | |
parent | [ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access (diff) | |
download | kernel-qcow2-linux-8eeee8b152ae6bbe181518efaf62ba8e9c613693.tar.gz kernel-qcow2-linux-8eeee8b152ae6bbe181518efaf62ba8e9c613693.tar.xz kernel-qcow2-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/ipv4/netfilter/ipt_CLUSTERIP.c')
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index c6cf84c77611..52926c8e3cc1 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -167,14 +167,13 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, /* create proc dir entry */ sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); - c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, - clusterip_procdir); + c->pde = proc_create(buffer, S_IWUSR|S_IRUSR, + clusterip_procdir, &clusterip_proc_fops); if (!c->pde) { kfree(c); return NULL; } } - c->pde->proc_fops = &clusterip_proc_fops; c->pde->data = c; #endif |