All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6.13] u32 fix.
@ 2005-09-16 13:48 Paweł Sikora
  2005-09-16 14:14 ` Samir Bellabes
  0 siblings, 1 reply; 4+ messages in thread
From: Paweł Sikora @ 2005-09-16 13:48 UTC (permalink / raw)
  To: Netfilter Development Mailinglist, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Hi,

Could someone check and commit this lockhelp-fix?

Regards,
Paweł.

-- 
The only thing necessary for the triumph of evil
  is for good men to do nothing.
                                           - Edmund Burke

[-- Attachment #2: u32-2.6.13.patch --]
[-- Type: text/x-diff, Size: 1513 bytes --]

Index: patchlets/u32/linux-2.6/net/ipv4/netfilter/ipt_u32.c
===================================================================
--- patchlets/u32/linux-2.6/net/ipv4/netfilter/ipt_u32.c	(revision 4262)
+++ patchlets/u32/linux-2.6/net/ipv4/netfilter/ipt_u32.c	(working copy)
@@ -105,7 +105,6 @@
 
 #include <linux/netfilter_ipv4/ipt_u32.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter_ipv4/lockhelp.h>
 
 /* #include <asm-i386/timex.h> for timing */
 
@@ -115,7 +114,7 @@
 
 /* This is slow, but it's simple. --RR */
 static char u32_buffer[65536];
-static DECLARE_LOCK(u32_lock);
+static DEFINE_SPINLOCK(u32_lock);
 
 static int
 match(const struct sk_buff *skb,
@@ -136,7 +135,7 @@
 
 	u_int32_t AttPos;
 
-	LOCK_BH(&u32_lock);
+	spin_lock_bh(&u32_lock);
 
 	head = skb_header_pointer(skb, 0, skb->len, u32_buffer);
 	BUG_ON(head == NULL);
@@ -148,7 +147,7 @@
 	        AttPos = 0;
 		pos = data->tests[testind].location[0].number;
 		if (AttPos + pos + 3 > skb->len || AttPos + pos < 0){
-			UNLOCK_BH(&u32_lock);
+			spin_unlock_bh(&u32_lock);
 			return 0;
 		}
 		val = (base[pos]<<24) + (base[pos+1]<<16) +
@@ -190,13 +189,13 @@
 			/* cycles2 = get_cycles(); 
 			   printk("failed %d in %d cycles\n", testind, 
 				  cycles2-cycles1); */
-			UNLOCK_BH(&u32_lock);
+			spin_unlock_bh(&u32_lock);
 			return 0;
 		}
 	}
 	/* cycles2 = get_cycles();
 	   printk("succeeded in %d cycles\n", cycles2-cycles1); */
-	UNLOCK_BH(&u32_lock);
+	spin_unlock_bh(&u32_lock);
 	return 1;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2.6.13] u32 fix.
  2005-09-16 13:48 [2.6.13] u32 fix Paweł Sikora
@ 2005-09-16 14:14 ` Samir Bellabes
  2005-09-20 23:08   ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Samir Bellabes @ 2005-09-16 14:14 UTC (permalink / raw)
  To: Paweł Sikora; +Cc: Netfilter Development Mailinglist, Patrick McHardy

Paweł Sikora <pluto@agmk.net> writes:

> Hi,
>
> Could someone check and commit this lockhelp-fix?
Hi,
it should be ok, as it's the same patch discussed here:
http://lists.netfilter.org/pipermail/netfilter-devel/2005-August/021158.html

Yours is better as it's against the svn tree, the mine is against a
kernel tree.

regards,
Samir Bellabes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2.6.13] u32 fix.
  2005-09-16 14:14 ` Samir Bellabes
@ 2005-09-20 23:08   ` Patrick McHardy
  2005-09-21 14:10     ` Samir Bellabes
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2005-09-20 23:08 UTC (permalink / raw)
  To: Samir Bellabes; +Cc: Netfilter Development Mailinglist

Samir Bellabes wrote:
> Paweł Sikora <pluto@agmk.net> writes:
> 
>>Could someone check and commit this lockhelp-fix?
> 
> it should be ok, as it's the same patch discussed here:
> http://lists.netfilter.org/pipermail/netfilter-devel/2005-August/021158.html
> 
> Yours is better as it's against the svn tree, the mine is against a
> kernel tree.

Harald has now applied a similar patch, right?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2.6.13] u32 fix.
  2005-09-20 23:08   ` Patrick McHardy
@ 2005-09-21 14:10     ` Samir Bellabes
  0 siblings, 0 replies; 4+ messages in thread
From: Samir Bellabes @ 2005-09-21 14:10 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Samir Bellabes, Netfilter Development Mailinglist

Patrick McHardy <kaber@trash.net> writes:

> Samir Bellabes wrote:
>> Paweł Sikora <pluto@agmk.net> writes:
>> 
>>>Could someone check and commit this lockhelp-fix?
>> 
>> it should be ok, as it's the same patch discussed here:
>> http://lists.netfilter.org/pipermail/netfilter-devel/2005-August/021158.html
>> 
>> Yours is better as it's against the svn tree, the mine is against a
>> kernel tree.
>
> Harald has now applied a similar patch, right?
Yes, it's revision 4265
thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-21 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-16 13:48 [2.6.13] u32 fix Paweł Sikora
2005-09-16 14:14 ` Samir Bellabes
2005-09-20 23:08   ` Patrick McHardy
2005-09-21 14:10     ` Samir Bellabes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.