On 02.02.2016 04:56, Alexander Duyck wrote:
@@ -394,7 +407,7 @@ ip_proto_again:
                                                    data, hlen, &_eth);
                         if (!eth)
                                 goto out_bad;
-                       proto = eth->h_proto;
+                       proto = get_unaligned_be16(&eth->h_proto);
                         nhoff += sizeof(*eth);
                 }

This piece doesn't make any sense to me.  It is already only 2 bytes
wide.  I'm not sure why we should be seeing this trigger an unaligned
access.  Are you sure it wasn't something like the keyid causing the
issue?  I'd be interested in seeing what the compiler did here that it
is triggering the problem.


Correct, and the __packed attribute of struct ethhdr already causes all members to have an assumed-alignment of '1', so gcc doesn't create any 16 bit width accesses anyway.

Bye,
Hannes

Reply via email to