Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-10 Thread Jarek Poplawski
On Tue, Jan 09, 2007 at 09:26:46AM -0500, Paul Moore wrote: On Tuesday 09 January 2007 3:43 am, Jarek Poplawski wrote: ... But if you consider this code will probably become classical and will be read, quoted and teached next 1000 years, then the style could matter... This from the guy

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-10 Thread Paul Moore
On Wednesday 10 January 2007 5:01 am, Jarek Poplawski wrote: On Tue, Jan 09, 2007 at 09:26:46AM -0500, Paul Moore wrote: On Tuesday 09 January 2007 3:43 am, Jarek Poplawski wrote: ... But if you consider this code will probably become classical and will be read, quoted and teached next

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-10 Thread Jarek Poplawski
On Wed, Jan 10, 2007 at 08:13:57AM -0500, Paul Moore wrote: On Wednesday 10 January 2007 5:01 am, Jarek Poplawski wrote: On Tue, Jan 09, 2007 at 09:26:46AM -0500, Paul Moore wrote: On Tuesday 09 January 2007 3:43 am, Jarek Poplawski wrote: ... But if you consider this code will probably

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-09 Thread Jarek Poplawski
On Mon, Jan 08, 2007 at 09:47:29AM -0500, Paul Moore wrote: ... I guess it all depends on who is reading it ;) Sure! I only had a feeling your way is maybe slightly less often used so I wanted some opinion. Personally, I don't care too much either way as long as it is fixed. Yes, you've

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-09 Thread Paul Moore
On Tuesday 09 January 2007 3:43 am, Jarek Poplawski wrote: ... But if you consider this code will probably become classical and will be read, quoted and teached next 1000 years, then the style could matter... This from the guy who believes Justin Timberlake rocks! ;) All right, you convinced

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-09 Thread Arnaldo Carvalho de Melo
On 1/9/07, Paul Moore [EMAIL PROTECTED] wrote: On Tuesday 09 January 2007 3:43 am, Jarek Poplawski wrote: ... But if you consider this code will probably become classical and will be read, quoted and teached next 1000 years, then the style could matter... This from the guy who believes

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-08 Thread Jarek Poplawski
On 04-01-2007 21:04, Paul Moore wrote: ... +++ net-2.6.20_bugfix_2/net/ipv4/af_inet.c @@ -305,7 +305,7 @@ lookup_protocol: sk-sk_reuse = 1; inet = inet_sk(sk); - inet-is_icsk = INET_PROTOSW_ICSK answer_flags; + inet-is_icsk = (INET_PROTOSW_ICSK answer_flags)

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-08 Thread Paul Moore
On Monday, January 8 2007 8:25 am, Jarek Poplawski wrote: On 04-01-2007 21:04, Paul Moore wrote: +++ net-2.6.20_bugfix_2/net/ipv4/af_inet.c @@ -305,7 +305,7 @@ lookup_protocol: sk-sk_reuse = 1; inet = inet_sk(sk); - inet-is_icsk = INET_PROTOSW_ICSK answer_flags; +

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-04 Thread David Miller
From: Paul Moore [EMAIL PROTECTED] Date: Thu, 04 Jan 2007 15:04:31 -0500 From: Paul Moore [EMAIL PROTECTED] The inet_create() and inet6_create() functions incorrectly set the inet_sock-is_icsk field. Both functions assume that the is_icsk field is large enough to hold at least a

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-04 Thread Arnaldo Carvalho de Melo
On 1/4/07, David Miller [EMAIL PROTECTED] wrote: From: Paul Moore [EMAIL PROTECTED] Date: Thu, 04 Jan 2007 15:04:31 -0500 From: Paul Moore [EMAIL PROTECTED] The inet_create() and inet6_create() functions incorrectly set the inet_sock-is_icsk field. Both functions assume that the is_icsk

Re: [PATCH] INET: fix incorrect inet_sock-is_icsk assignment

2007-01-04 Thread David Miller
From: Arnaldo Carvalho de Melo [EMAIL PROTECTED] Date: Fri, 5 Jan 2007 00:32:31 -0200 I expected a warning since the and operation clearly could yield a value that would overflow, just like in the constant case... It sounds stupid, but once you introduce variables and not everything is