summaryrefslogtreecommitdiff
path: root/drivers/block/aoe/aoenet.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2007-03-02 02:30:08 (GMT)
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-02 23:22:55 (GMT)
commit43ecf5295b622e9ec93f5b932949acf1c6e4150c (patch)
tree781fe4935ab8d37f199d66da37adfdd4e8244480 /drivers/block/aoe/aoenet.c
parent7ab876703dcbe852652db6441f0aadb3d6b75e94 (diff)
downloadlinux-43ecf5295b622e9ec93f5b932949acf1c6e4150c.tar.xz
[AOE]: Add get_unaligned() calls where needed.
Based upon a report by Andrew Walrond. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/block/aoe/aoenet.c')
-rw-r--r--drivers/block/aoe/aoenet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 9626e0f..aab6d91 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -8,6 +8,7 @@
#include <linux/blkdev.h>
#include <linux/netdevice.h>
#include <linux/moduleparam.h>
+#include <asm/unaligned.h>
#include "aoe.h"
#define NECODES 5
@@ -123,7 +124,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
skb_push(skb, ETH_HLEN); /* (1) */
h = (struct aoe_hdr *) skb->mac.raw;
- n = be32_to_cpu(h->tag);
+ n = be32_to_cpu(get_unaligned(&h->tag));
if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31))
goto exit;
@@ -133,7 +134,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
n = 0;
if (net_ratelimit())
printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n",
- be16_to_cpu(h->major), h->minor,
+ be16_to_cpu(get_unaligned(&h->major)), h->minor,
h->err, aoe_errlist[n]);
goto exit;
}