Skip to content

Commit 3e801ea

Browse files
edumazetgregkh
authored andcommitted
xfrm: fix a small bug in xfrm_sa_len()
[ Upstream commit 7770a39 ] copy_user_offload() will actually push a struct struct xfrm_user_offload, which is different than (struct xfrm_state *)->xso (struct xfrm_state_offload) Fixes: d77e38e ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b87034d commit 3e801ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/xfrm/xfrm_user.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2898,7 +2898,7 @@ static inline unsigned int xfrm_sa_len(struct xfrm_state *x)
28982898
if (x->props.extra_flags)
28992899
l += nla_total_size(sizeof(x->props.extra_flags));
29002900
if (x->xso.dev)
2901-
l += nla_total_size(sizeof(x->xso));
2901+
l += nla_total_size(sizeof(struct xfrm_user_offload));
29022902
if (x->props.smark.v | x->props.smark.m) {
29032903
l += nla_total_size(sizeof(x->props.smark.v));
29042904
l += nla_total_size(sizeof(x->props.smark.m));

0 commit comments

Comments
 (0)