diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2015-10-21 17:48:25 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2015-10-23 06:49:29 +0200 |
commit | e33d4f13d21e9f604194ebc8730077ff39916c50 (patch) | |
tree | 8a23a63e2b4240124c3ee55addf0c1e59fba00eb /init | |
parent | xfrm: Let the flowcache handle its size by default. (diff) | |
download | linux-e33d4f13d21e9f604194ebc8730077ff39916c50.tar.xz linux-e33d4f13d21e9f604194ebc8730077ff39916c50.zip |
xfrm: Fix unaligned access to stats in copy_to_user_state()
On sparc, deleting established SAs (e.g., by restarting ipsec)
results in unaligned access messages via xfrm_del_sa ->
km_state_notify -> xfrm_send_state_notify().
Even though struct xfrm_usersa_info is aligned on 8-byte boundaries,
netlink attributes are fundamentally only 4 byte aligned, and this
cannot be changed for nla_data() that is passed up to userspace.
As a result, the put_unaligned() macro needs to be used to
set up potentially unaligned fields such as the xfrm_stats in
copy_to_user_state()
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions