public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Unaligned accesses in net/ipv4/netfilter/arp_tables.c:184
@ 2004-06-09 18:09 Christoph Lameter
  2004-06-09 18:27 ` Alex Williamson
  2004-06-11  5:04 ` David S. Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Christoph Lameter @ 2004-06-09 18:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ia64

The following code casts pointers to char to long in order to do a fast
comparison. This causes alignment errors on IA64 and likely also on
other platforms:

        /* Look for ifname matches; this should unroll nicely. */
        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];
        }

iniface is a pointer to char.

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

end of thread, other threads:[~2004-06-11  5:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-09 18:09 Unaligned accesses in net/ipv4/netfilter/arp_tables.c:184 Christoph Lameter
2004-06-09 18:27 ` Alex Williamson
2004-06-09 20:00   ` David S. Miller
2004-06-09 20:29     ` Alex Williamson
2004-06-09 20:29       ` David S. Miller
2004-06-09 21:33         ` Harald Welte
2004-06-09 21:52           ` Alex Williamson
2004-06-10  1:45     ` Chris Wedgwood
2004-06-10  5:46       ` Harald Welte
2004-06-11  5:04 ` David S. Miller
2004-06-11  5:41   ` Andreas Dilger
2004-06-11  5:40     ` David S. Miller

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