|
@@ -424,6 +424,16 @@ __nf_conntrack_confirm(struct sk_buff *skb)
|
|
|
|
|
|
spin_lock_bh(&nf_conntrack_lock);
|
|
spin_lock_bh(&nf_conntrack_lock);
|
|
|
|
|
|
|
|
+ /* We have to check the DYING flag inside the lock to prevent
|
|
|
|
+ a race against nf_ct_get_next_corpse() possibly called from
|
|
|
|
+ user context, else we insert an already 'dead' hash, blocking
|
|
|
|
+ further use of that particular connection -JM */
|
|
|
|
+
|
|
|
|
+ if (unlikely(nf_ct_is_dying(ct))) {
|
|
|
|
+ spin_unlock_bh(&nf_conntrack_lock);
|
|
|
|
+ return NF_ACCEPT;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* See if there's one in the list already, including reverse:
|
|
/* See if there's one in the list already, including reverse:
|
|
NAT could have grabbed it without realizing, since we're
|
|
NAT could have grabbed it without realizing, since we're
|
|
not in the hash. If there is, we lost race. */
|
|
not in the hash. If there is, we lost race. */
|