Skip to content

Commit 195e4aa

Browse files
edumazetklassert
authored andcommitted
xfrm: consistently use time64_t in xfrm_timer_handler()
For some reason, blamed commit did the right thing in xfrm_policy_timer() but did not in xfrm_timer_handler() Fixes: 386c568 ("xfrm: use time64_t for in-kernel timestamps") Signed-off-by: Eric Dumazet <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Steffen Klassert <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent b6ee896 commit 195e4aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/xfrm/xfrm_state.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ static enum hrtimer_restart xfrm_timer_handler(struct hrtimer *me)
577577
if (x->km.state == XFRM_STATE_EXPIRED)
578578
goto expired;
579579
if (x->lft.hard_add_expires_seconds) {
580-
long tmo = x->lft.hard_add_expires_seconds +
580+
time64_t tmo = x->lft.hard_add_expires_seconds +
581581
x->curlft.add_time - now;
582582
if (tmo <= 0) {
583583
if (x->xflags & XFRM_SOFT_EXPIRE) {
@@ -594,7 +594,7 @@ static enum hrtimer_restart xfrm_timer_handler(struct hrtimer *me)
594594
next = tmo;
595595
}
596596
if (x->lft.hard_use_expires_seconds) {
597-
long tmo = x->lft.hard_use_expires_seconds +
597+
time64_t tmo = x->lft.hard_use_expires_seconds +
598598
(x->curlft.use_time ? : now) - now;
599599
if (tmo <= 0)
600600
goto expired;
@@ -604,7 +604,7 @@ static enum hrtimer_restart xfrm_timer_handler(struct hrtimer *me)
604604
if (x->km.dying)
605605
goto resched;
606606
if (x->lft.soft_add_expires_seconds) {
607-
long tmo = x->lft.soft_add_expires_seconds +
607+
time64_t tmo = x->lft.soft_add_expires_seconds +
608608
x->curlft.add_time - now;
609609
if (tmo <= 0) {
610610
warn = 1;
@@ -616,7 +616,7 @@ static enum hrtimer_restart xfrm_timer_handler(struct hrtimer *me)
616616
}
617617
}
618618
if (x->lft.soft_use_expires_seconds) {
619-
long tmo = x->lft.soft_use_expires_seconds +
619+
time64_t tmo = x->lft.soft_use_expires_seconds +
620620
(x->curlft.use_time ? : now) - now;
621621
if (tmo <= 0)
622622
warn = 1;

0 commit comments

Comments
 (0)