summaryrefslogtreecommitdiff
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-03-16 16:30:44 +0300
committerDavid S. Miller <davem@davemloft.net>2010-03-20 08:47:23 +0300
commitf5d410f2ea7ba340f11815a56e05b9fa9421c421 (patch)
tree8a03047550a63d94063443b8b3e8c63e472ae469 /include/net/netlink.h
parent6830c25b7d08fbbd922959425193791bc42079f2 (diff)
downloadlinux-f5d410f2ea7ba340f11815a56e05b9fa9421c421.tar.xz
netlink: fix unaligned access in nla_get_be64()
This patch fixes a unaligned access in nla_get_be64() that was introduced by myself in a17c859849402315613a0015ac8fbf101acf0cc1. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index f82e463c875a..4fc05b58503e 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla)
*/
static inline __be64 nla_get_be64(const struct nlattr *nla)
{
- return *(__be64 *) nla_data(nla);
+ __be64 tmp;
+
+ nla_memcpy(&tmp, nla, sizeof(tmp));
+
+ return tmp;
}
/**