Subject: Re: net: alignment problem in icmp code

From: David Miller <[email-masked]>
Date: Sat, 20 Oct 2007 22:12:57 -0700 (PDT)

From: Pierre Ossman <[email-masked]>
Date: Sat, 20 Oct 2007 23:35:40 +0200

> Structure assignment have to be aligned just like any assignment, and the skb could point to anything. So take the safe route and use a memcpy().
> 
> Signed-off-by: Pierre Ossman <[email-masked]>

Unfortunately this doesn't work, GCC can inline the memcpy just like
the assignment.

I tried to use a similar trick in the net/xfrm/xfrm_user.c code
but in the end it doesn't work at all.