Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48096
b: refs/heads/master
c: c3a47ab
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Feb 12, 2007
1 parent b6d9fdc commit 817ad68
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd19e44f449f7e2e58d42d7bb6813e2292c38fba
refs/heads/master: c3a47ab3e5ad62601449e4e5401352271b777e28
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ $(vmlinux-dirs): prepare scripts

pattern = ".*/localversion[^~]*"
string = $(shell cat /dev/null \
`find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort -u`)
`find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`)

localver = $(subst $(space),, $(string) \
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/netfilter/ip_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ static void free_conntrack_hash(struct list_head *hash, int vmalloced,int size)
supposed to kill the mall. */
void ip_conntrack_cleanup(void)
{
ip_ct_attach = NULL;
rcu_assign_pointer(ip_ct_attach, NULL);

/* This makes sure all current packets have passed through
netfilter framework. Roll on, two-stage module
Expand Down Expand Up @@ -1515,7 +1515,7 @@ int __init ip_conntrack_init(void)
write_unlock_bh(&ip_conntrack_lock);

/* For use by ipt_REJECT */
ip_ct_attach = ip_conntrack_attach;
rcu_assign_pointer(ip_ct_attach, ip_conntrack_attach);

/* Set up fake conntrack:
- to never be deleted, not in any hashes */
Expand Down
9 changes: 6 additions & 3 deletions trunk/net/netfilter/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,12 @@ void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb)
{
void (*attach)(struct sk_buff *, struct sk_buff *);

if (skb->nfct && (attach = ip_ct_attach) != NULL) {
mb(); /* Just to be sure: must be read before executing this */
attach(new, skb);
if (skb->nfct) {
rcu_read_lock();
attach = rcu_dereference(ip_ct_attach);
if (attach)
attach(new, skb);
rcu_read_unlock();
}
}
EXPORT_SYMBOL(nf_ct_attach);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ void nf_conntrack_cleanup(void)
{
int i;

ip_ct_attach = NULL;
rcu_assign_pointer(ip_ct_attach, NULL);

/* This makes sure all current packets have passed through
netfilter framework. Roll on, two-stage module
Expand Down Expand Up @@ -1273,7 +1273,7 @@ int __init nf_conntrack_init(void)
write_unlock_bh(&nf_conntrack_lock);

/* For use by REJECT target */
ip_ct_attach = __nf_conntrack_attach;
rcu_assign_pointer(ip_ct_attach, __nf_conntrack_attach);

/* Set up fake conntrack:
- to never be deleted, not in any hashes */
Expand Down

0 comments on commit 817ad68

Please sign in to comment.