public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Unaligned accesses in the ethernet bridge
@ 2006-03-23  2:06 Peter Chubb
  2006-03-23  2:50 ` Randy.Dunlap
  2006-04-06 20:37 ` Adrian Bunk
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Chubb @ 2006-03-23  2:06 UTC (permalink / raw)
  To: shemminger; +Cc: linux-kernel


I see lots of
	kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
	kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
	kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
messages in my logs on IA64 when using the ethernet bridge with 2.6.16.


Appended is a patch to fix them.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>


 net/bridge/br_stp_bpdu.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6-import/net/bridge/br_stp_bpdu.c
===================================================================
--- linux-2.6-import.orig/net/bridge/br_stp_bpdu.c	2006-03-22 09:11:01.349886375 +1100
+++ linux-2.6-import/net/bridge/br_stp_bpdu.c	2006-03-23 12:52:13.719239205 +1100
@@ -19,6 +19,7 @@
 #include <linux/llc.h>
 #include <net/llc.h>
 #include <net/llc_pdu.h>
+#include <asm/unaligned.h>
 
 #include "br_private.h"
 #include "br_private_stp.h"
@@ -59,12 +60,12 @@ static inline void br_set_ticks(unsigned
 {
 	unsigned long ticks = (STP_HZ * j)/ HZ;
 
-	*((__be16 *) dest) = htons(ticks);
+	put_unaligned(htons(ticks), (__be16 *)dest);
 }
 
 static inline int br_get_ticks(const unsigned char *src)
 {
-	unsigned long ticks = ntohs(*(__be16 *)src);
+	unsigned long ticks = ntohs(get_unaligned((__be16 *)src));
 
 	return (ticks * HZ + STP_HZ - 1) / STP_HZ;
 }

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

* Re: [PATCH] Unaligned accesses in the ethernet bridge
  2006-03-23  2:06 [PATCH] Unaligned accesses in the ethernet bridge Peter Chubb
@ 2006-03-23  2:50 ` Randy.Dunlap
  2006-03-23  3:04   ` Nicholas Miell
  2006-03-23  3:05   ` Patrick McFarland
  2006-04-06 20:37 ` Adrian Bunk
  1 sibling, 2 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-03-23  2:50 UTC (permalink / raw)
  To: Peter Chubb; +Cc: shemminger, linux-kernel

On Thu, 23 Mar 2006 13:06:02 +1100 Peter Chubb wrote:

That's all that I see unless I look at the raw email file with
a text editor.  Neither sylpheed nor thunderbird care for it...

What's up with this email message?

---
~Randy

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

* Re: [PATCH] Unaligned accesses in the ethernet bridge
  2006-03-23  2:50 ` Randy.Dunlap
@ 2006-03-23  3:04   ` Nicholas Miell
  2006-03-23  3:05   ` Patrick McFarland
  1 sibling, 0 replies; 7+ messages in thread
From: Nicholas Miell @ 2006-03-23  3:04 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Peter Chubb, shemminger, linux-kernel

On Wed, 2006-03-22 at 18:50 -0800, Randy.Dunlap wrote:
> On Thu, 23 Mar 2006 13:06:02 +1100 Peter Chubb wrote:
> 
> That's all that I see unless I look at the raw email file with
> a text editor.  Neither sylpheed nor thunderbird care for it...
> 
> What's up with this email message?

The message body is in multipart/mixed format, but it contains nothing
besides a preamble, which MIME conformant MUAs ignore. 

Typically, the preamble is just "This is a multipart MIME formatted
message.", but Peter's mailer seems to have decided to stick his entire
message body there.

-- 
Nicholas Miell <nmiell@comcast.net>


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

* Re: [PATCH] Unaligned accesses in the ethernet bridge
  2006-03-23  2:50 ` Randy.Dunlap
  2006-03-23  3:04   ` Nicholas Miell
@ 2006-03-23  3:05   ` Patrick McFarland
  1 sibling, 0 replies; 7+ messages in thread
From: Patrick McFarland @ 2006-03-23  3:05 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Peter Chubb, shemminger, linux-kernel

On Wednesday 22 March 2006 21:50, Randy.Dunlap wrote:
> On Thu, 23 Mar 2006 13:06:02 +1100 Peter Chubb wrote:
>
> That's all that I see unless I look at the raw email file with
> a text editor.  Neither sylpheed nor thunderbird care for it...
>
> What's up with this email message?

Kmail doesnt like it either. Its multipart, but the plain text body part is 
empty. How strange.

-- 
Patrick "Diablo-D3" McFarland || diablod3@gmail.com
"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." -- Kristian Wilson, Nintendo,
Inc, 1989


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

* Re: [PATCH] Unaligned accesses in the ethernet bridge
  2006-03-23  2:06 [PATCH] Unaligned accesses in the ethernet bridge Peter Chubb
  2006-03-23  2:50 ` Randy.Dunlap
@ 2006-04-06 20:37 ` Adrian Bunk
  2006-04-07 23:57   ` Stephen Hemminger
  1 sibling, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2006-04-06 20:37 UTC (permalink / raw)
  To: Peter Chubb; +Cc: shemminger, linux-kernel, netdev

On Thu, Mar 23, 2006 at 01:06:02PM +1100, Peter Chubb wrote:
> 
> I see lots of
> 	kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
> 	kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
> 	kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
> messages in my logs on IA64 when using the ethernet bridge with 2.6.16.
> 
> 
> Appended is a patch to fix them.


I see this patch already made it into 2.6.17-rc1.

It seems to be a candidate for 2.6.16.3, too?
If yes, please submit it to stable@kernel.org.


> Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
> 
> 
>  net/bridge/br_stp_bpdu.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6-import/net/bridge/br_stp_bpdu.c
> ===================================================================
> --- linux-2.6-import.orig/net/bridge/br_stp_bpdu.c	2006-03-22 09:11:01.349886375 +1100
> +++ linux-2.6-import/net/bridge/br_stp_bpdu.c	2006-03-23 12:52:13.719239205 +1100
> @@ -19,6 +19,7 @@
>  #include <linux/llc.h>
>  #include <net/llc.h>
>  #include <net/llc_pdu.h>
> +#include <asm/unaligned.h>
>  
>  #include "br_private.h"
>  #include "br_private_stp.h"
> @@ -59,12 +60,12 @@ static inline void br_set_ticks(unsigned
>  {
>  	unsigned long ticks = (STP_HZ * j)/ HZ;
>  
> -	*((__be16 *) dest) = htons(ticks);
> +	put_unaligned(htons(ticks), (__be16 *)dest);
>  }
>  
>  static inline int br_get_ticks(const unsigned char *src)
>  {
> -	unsigned long ticks = ntohs(*(__be16 *)src);
> +	unsigned long ticks = ntohs(get_unaligned((__be16 *)src));
>  
>  	return (ticks * HZ + STP_HZ - 1) / STP_HZ;
>  }

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] Unaligned accesses in the ethernet bridge
  2006-04-06 20:37 ` Adrian Bunk
@ 2006-04-07 23:57   ` Stephen Hemminger
  2006-04-09 14:26     ` Adrian Bunk
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2006-04-07 23:57 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Chubb, linux-kernel, netdev

On Thu, 6 Apr 2006 22:37:08 +0200
Adrian Bunk <bunk@stusta.de> wrote:

> On Thu, Mar 23, 2006 at 01:06:02PM +1100, Peter Chubb wrote:
> > 
> > I see lots of
> > 	kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
> > 	kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
> > 	kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
> > messages in my logs on IA64 when using the ethernet bridge with 2.6.16.
> > 
> > 
> > Appended is a patch to fix them.
> 
> 
> I see this patch already made it into 2.6.17-rc1.
> 
> It seems to be a candidate for 2.6.16.3, too?
> If yes, please submit it to stable@kernel.org.

The code that caused this was new in 2.6.17

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

* Re: [PATCH] Unaligned accesses in the ethernet bridge
  2006-04-07 23:57   ` Stephen Hemminger
@ 2006-04-09 14:26     ` Adrian Bunk
  0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2006-04-09 14:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Peter Chubb, linux-kernel, netdev

On Fri, Apr 07, 2006 at 04:57:11PM -0700, Stephen Hemminger wrote:
> On Thu, 6 Apr 2006 22:37:08 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > On Thu, Mar 23, 2006 at 01:06:02PM +1100, Peter Chubb wrote:
> > > 
> > > I see lots of
> > > 	kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
> > > 	kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
> > > 	kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
> > > messages in my logs on IA64 when using the ethernet bridge with 2.6.16.
> > > 
> > > 
> > > Appended is a patch to fix them.
> > 
> > 
> > I see this patch already made it into 2.6.17-rc1.
> > 
> > It seems to be a candidate for 2.6.16.3, too?
> > If yes, please submit it to stable@kernel.org.
> 
> The code that caused this was new in 2.6.17

Ah sorry, Peter's "when using the ethernet bridge with 2.6.16" confused 
me.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2006-04-09 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-23  2:06 [PATCH] Unaligned accesses in the ethernet bridge Peter Chubb
2006-03-23  2:50 ` Randy.Dunlap
2006-03-23  3:04   ` Nicholas Miell
2006-03-23  3:05   ` Patrick McFarland
2006-04-06 20:37 ` Adrian Bunk
2006-04-07 23:57   ` Stephen Hemminger
2006-04-09 14:26     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox