diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-03-16 09:30:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 19:02:09 -0400 |
commit | f8adc4007d65d74f68c8ee3cbd4a068fc415580c (patch) | |
tree | 360b975b1a8deee81420098ce3bcf327c432408a /include | |
parent | 5dda8d1fc44f3ab37c0e5c8e980254b6703ef8b2 (diff) |
netlink: fix unaligned access in nla_get_be64()
[ Upstream commit f5d410f2ea7ba340f11815a56e05b9fa9421c421 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netlink.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index a63b2192ac1c..668ad04a9171 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) | |||
945 | */ | 945 | */ |
946 | static inline __be64 nla_get_be64(const struct nlattr *nla) | 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) |
947 | { | 947 | { |
948 | return *(__be64 *) nla_data(nla); | 948 | __be64 tmp; |
949 | |||
950 | nla_memcpy(&tmp, nla, sizeof(tmp)); | ||
951 | |||
952 | return tmp; | ||
949 | } | 953 | } |
950 | 954 | ||
951 | /** | 955 | /** |