diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-19 16:00:04 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-19 16:00:04 -0700 |
commit | 0344f1c66b544609e867bd24aa7bfa789dfa9830 (patch) | |
tree | 7f76abc095a90f7ad475417495d3d4f577080ae1 /net/netfilter/nf_conntrack_extend.c | |
parent | dad9b335c6940de2746a9788eb456d09cf102f81 (diff) | |
parent | ef3a62d272f033989e83eb1f26505f93f93e3e69 (diff) | |
download | linux-stable-0344f1c66b544609e867bd24aa7bfa789dfa9830.tar.gz linux-stable-0344f1c66b544609e867bd24aa7bfa789dfa9830.tar.bz2 linux-stable-0344f1c66b544609e867bd24aa7bfa789dfa9830.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/tx.c
Diffstat (limited to 'net/netfilter/nf_conntrack_extend.c')
-rw-r--r-- | net/netfilter/nf_conntrack_extend.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index ba1c4915e9eb..3469bc71a385 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c @@ -59,12 +59,19 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp) if (!*ext) return NULL; + INIT_RCU_HEAD(&(*ext)->rcu); (*ext)->offset[id] = off; (*ext)->len = len; return (void *)(*ext) + off; } +static void __nf_ct_ext_free_rcu(struct rcu_head *head) +{ + struct nf_ct_ext *ext = container_of(head, struct nf_ct_ext, rcu); + kfree(ext); +} + void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) { struct nf_ct_ext *new; @@ -104,7 +111,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) (void *)ct->ext + ct->ext->offset[i]); rcu_read_unlock(); } - kfree(ct->ext); + call_rcu(&ct->ext->rcu, __nf_ct_ext_free_rcu); ct->ext = new; } |