Skip to contentSkip to conversation

missing spin_unlock_bh in u32 match

PATCH Applied Pablo Neira Ayuso 2 participants 2 messages Nov 25, 2005 – Nov 26, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 missing spin_unlock_bh in u32 match

Fix missing spin_unlock_bh in exit path in u32. This problem only affects the 2.6 branch.

Signature · 1 line
Pablo
u32/linux-2.6/net/ipv4/netfilter/ipt_u32.c +3 -1
Index: patchlets/u32/linux-2.6/net/ipv4/netfilter/ipt_u32.c
===================================================================
@@ -166,8 +166,10 @@
 			case IPT_U32_AT:
 				AttPos += val;
 				pos = number;
-				if (AttPos + pos + 3 > skb->len || AttPos + pos < 0) 
+				if (AttPos + pos + 3 > skb->len || AttPos + pos < 0) {
+					spin_unlock_bh(&u32_lock);
 					return 0;
+				}
 
 				val = (base[AttPos + pos]<<24) 
 				     +(base[AttPos + pos + 1]<<16)
#1 lore raw
Quoted 2 lines · Pablo Neira Ayuso

Fix missing spin_unlock_bh in exit path in u32. This problem only affects the 2.6 branch.

Applied, thanks Pablo.