From: Pablo Neira Ayuso Date: Wed, 20 Sep 2006 19:01:06 +0000 (-0700) Subject: [NETFILTER]: conntrack: fix race condition in early_drop X-Git-Tag: v2.6.19-rc1~1272^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5251e2d2125407bbff0c39394a4011be9ed8b5d0;p=pandora-kernel.git [NETFILTER]: conntrack: fix race condition in early_drop On SMP environments the maximum number of conntracks can be overpassed under heavy stress situations due to an existing race condition. CPU A CPU B atomic_read() ... early_drop() ... ... atomic_read() allocate conntrack allocate conntrack atomic_inc() atomic_inc() This patch moves the counter incrementation before the early drop stage. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- Reading git-diff-tree failed