Message ID | 20100316233044.4185.69099.stgit@decadence |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Pablo Neira Ayuso <pablo@netfilter.org> Date: Wed, 17 Mar 2010 00:30:44 +0100 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/net/netlink.h b/include/net/netlink.h index a63b219..668ad04 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; } /**
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> --- include/net/netlink.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html