Messages in this thread | | | Date | Tue, 15 Apr 2008 20:31:08 -0700 (PDT) | Subject | Re: TG3 network data corruption regression 2.6.24/2.6.23.4 | From | David Miller <> |
| |
From: Tony Battersby <tonyb@cybernetics.com> Date: Tue, 15 Apr 2008 11:39:27 -0400
> Thanks, your patch fixes the problem (tested on 2.6.24.4). However, I > had to change "(skb->mac_header & 3)" in your patch to "((long) > skb->mac_header & 3)" since mac_header is a pointer rather than an int > on 32-bit systems. > > Tested-by: Tony Battersby <tonyb@cybernetics.com>
Thanks for testing.
Matt, skb->mac_header is either a pointer or an integer offset depending upon whether we are building 32-bit or 64-bit.
Testing skb->mac_header is therefore wrong, because it's an offset from a pointer in the 64-bit case and therefore it's alignment does not indicate correctly the actual final alignment of skb->head + skb->max_header.
Therefore you should test skb_mac_header(skb) and cast it with (unsigned long).
Please respin this fix with that correction so I can apply it and get this bug fixed, thanks!
| |