diff mbox series

[4/6] xfrm: clone missing x->lastused in xfrm_do_migrate

Message ID 20220824050213.3643599-5-steffen.klassert@secunet.com (mailing list archive)
State Accepted
Commit 6aa811acdb76facca0b705f4e4c1d948ccb6af8b
Delegated to: Netdev Maintainers
Headers show
Series [1/6] xfrm: fix refcount leak in __xfrm_policy_check() | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Pull request is its own cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 358 this patch: 358
netdev/cc_maintainers fail 3 blamed authors not CCed: yoshfuji@linux-ipv6.org shinta.sugimoto@ericsson.com nakam@linux-ipv6.org; 5 maintainers not CCed: edumazet@google.com yoshfuji@linux-ipv6.org shinta.sugimoto@ericsson.com pabeni@redhat.com nakam@linux-ipv6.org
netdev/build_clang success Errors and warnings before: 5 this patch: 5
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 358 this patch: 358
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Steffen Klassert Aug. 24, 2022, 5:02 a.m. UTC
From: Antony Antony <antony.antony@secunet.com>

x->lastused was not cloned in xfrm_do_migrate. Add it to clone during
migrate.

Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_state.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index ccfb172eb5b8..11d89af9cb55 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1592,6 +1592,7 @@  static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
 	x->replay = orig->replay;
 	x->preplay = orig->preplay;
 	x->mapping_maxage = orig->mapping_maxage;
+	x->lastused = orig->lastused;
 	x->new_mapping = 0;
 	x->new_mapping_sport = 0;