mac80211: mesh: fix potentially unaligned access
authorJohannes Berg <johannes.berg@intel.com>
Mon, 20 Sep 2021 13:40:05 +0000 (15:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Oct 2021 05:53:11 +0000 (07:53 +0200)
commit35367a5b63d9df4d306be2caa988e245aa5c90b8
treebf2676fbef15474b57db6ec2506bb128f2458214
parent997ee230e4f5285cd98445c102d9033c7ec4814b
mac80211: mesh: fix potentially unaligned access

[ Upstream commit b9731062ce8afd35cf723bf3a8ad55d208f915a5 ]

The pointer here points directly into the frame, so the
access is potentially unaligned. Use get_unaligned_le16
to avoid that.

Fixes: 3f52b7e328c5 ("mac80211: mesh power save basics")
Link: https://lore.kernel.org/r/20210920154009.3110ff75be0c.Ib6a2ff9e9cc9bc6fca50fce631ec1ce725cc926b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mesh_ps.c