aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoenet.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2007-03-01 21:30:08 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-02 18:22:55 -0500
commit43ecf5295b622e9ec93f5b932949acf1c6e4150c (patch)
tree781fe4935ab8d37f199d66da37adfdd4e8244480 /drivers/block/aoe/aoenet.c
parent7ab876703dcbe852652db6441f0aadb3d6b75e94 (diff)
[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 9626e0f5da9..aab6d91a2c2 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -8,6 +8,7 @@
8#include <linux/blkdev.h> 8#include <linux/blkdev.h>
9#include <linux/netdevice.h> 9#include <linux/netdevice.h>
10#include <linux/moduleparam.h> 10#include <linux/moduleparam.h>
11#include <asm/unaligned.h>
11#include "aoe.h" 12#include "aoe.h"
12 13
13#define NECODES 5 14#define NECODES 5
@@ -123,7 +124,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
123 skb_push(skb, ETH_HLEN); /* (1) */ 124 skb_push(skb, ETH_HLEN); /* (1) */
124 125
125 h = (struct aoe_hdr *) skb->mac.raw; 126 h = (struct aoe_hdr *) skb->mac.raw;
126 n = be32_to_cpu(h->tag); 127 n = be32_to_cpu(get_unaligned(&h->tag));
127 if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31)) 128 if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31))
128 goto exit; 129 goto exit;
129 130
@@ -133,7 +134,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
133 n = 0; 134 n = 0;
134 if (net_ratelimit()) 135 if (net_ratelimit())
135 printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n", 136 printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n",
136 be16_to_cpu(h->major), h->minor, 137 be16_to_cpu(get_unaligned(&h->major)), h->minor,
137 h->err, aoe_errlist[n]); 138 h->err, aoe_errlist[n]);
138 goto exit; 139 goto exit;
139 } 140 }