From: Martin Josefsson Subject: [PATCH] Small SMP-race found in ip_conntrack_proto_tcp.c Date: 24 Oct 2002 17:19:14 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <1035472754.722.129.camel@tux> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: To: Netfilter-devel Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Hi, I just found a small SMP-race when looking at an ugly lock (tcp_lock) in ip_conntrack_proto_tcp.c we use conntrack->proto.tcp.handshake_ack without holding the lock. This is a very small race as it only applies to the ACK-packet in the three-way handshake and there will probably only be one of those. Patch to move the unlock further down is attached, I unlock before calling ip_ct_refresh as it is unfriendly to hold the lock longer than neccessary. I believe this lock can be removed completely in Rusty's optmization-patches, I'll send a patch for that aswell later. -- /Martin Never argue with an idiot. They drag you down to their level, then beat you with experience.