You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
xfrm: fix a small bug in xfrm_sa_len()
[ Upstream commit7770a39d7c] 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:d77e38e612("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b87034d7a2
commit
3e801ea43c
@@ -2898,7 +2898,7 @@ static inline unsigned int xfrm_sa_len(struct xfrm_state *x)
|
||||
if (x->props.extra_flags)
|
||||
l += nla_total_size(sizeof(x->props.extra_flags));
|
||||
if (x->xso.dev)
|
||||
l += nla_total_size(sizeof(x->xso));
|
||||
l += nla_total_size(sizeof(struct xfrm_user_offload));
|
||||
if (x->props.smark.v | x->props.smark.m) {
|
||||
l += nla_total_size(sizeof(x->props.smark.v));
|
||||
l += nla_total_size(sizeof(x->props.smark.m));
|
||||
|
||||
Reference in New Issue
Block a user