Skip to contentSkip to conversation

fix locking in conntrack-speed-locking and conntrack_expect_lock_removal

PATCH New Martin Josefsson 1 participant 1 message Oct 11, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix locking in conntrack-speed-locking and conntrack_expect_lock_removal

Hi Rusty,

I've attached two small fixes against your patches on kernel.org.

I think they're quite obvious so I won't describe them here.

I'll see if I can get the testmachine up and running to actually test your patches and see how much diffrence they make on a 2-way SMP.

Signature · 4 lines
/Martin

Never argue with an idiot. They drag you down to their level, then beat
you with experience.
conntrack-speed-locking.patch renamed from conntrack-speed-locking.patch.orig +1 -1
@@ -81,7 +81,7 @@
 +								\
 +		hash_a = hash_conntrack(tuple_a);		\
 +		hash_b = hash_conntrack(tuple_b);		\
-+		if (hash_a < hash_b) {				\
++		if (hash_a > hash_b) {				\
 +			op(&ip_conntrack_hash[hash_a].lock);	\
 +			op(&ip_conntrack_hash[hash_b].lock);	\
 +		} else if (hash_a < hash_b) {			\
conntrack_expect_lock_removal.patch renamed from conntrack_expect_lock_removal.patch.orig +1 -1
@@ -125,7 +125,7 @@
  	}
 -	
 -	return -1;
-+	WRITE_UNLOCK(&ip_conntrack_expect);
++	WRITE_UNLOCK(&ip_conntrack_lock);
 +	return ret;
  }