Messages in this thread | | | Date | Thu, 10 Jun 2004 23:41:11 -0600 | From | Andreas Dilger <> | Subject | Re: Unaligned accesses in net/ipv4/netfilter/arp_tables.c:184 |
| |
On Jun 10, 2004 22:04 -0700, David S. Miller wrote: > This is far from a critical code path, so this is how I'm > going to fix this. > > # This is a BitKeeper generated diff -Nru style patch. > # > # ChangeSet > # 2004/06/10 22:05:19-07:00 davem@nuts.davemloft.net > # [IPV4]: Fix unaligned accesses in arp_tables.c > # > # net/ipv4/netfilter/arp_tables.c > # 2004/06/10 22:05:03-07:00 davem@nuts.davemloft.net +3 -4 > # [IPV4]: Fix unaligned accesses in arp_tables.c > # > diff -Nru a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c > --- a/net/ipv4/netfilter/arp_tables.c 2004-06-10 22:05:40 -07:00 > +++ b/net/ipv4/netfilter/arp_tables.c 2004-06-10 22:05:40 -07:00 > @@ -179,11 +179,10 @@ > return 0; > } > > - /* Look for ifname matches; this should unroll nicely. */ > + /* Look for ifname matches. */ > for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { > - ret |= (((const unsigned long *)indev)[i] > - ^ ((const unsigned long *)arpinfo->iniface)[i]) > - & ((const unsigned long *)arpinfo->iniface_mask)[i]; > + ret |= (indev[i] ^ arpinfo->iniface[i]) > + & arpinfo->iniface_mask[i]; > }
- for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { + for (i = 0, ret = 0; i < IFNAMSIZ; i++) {
Shouldn't your change include the above?
Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
[unhandled content-type:application/pgp-signature] | |