From: Hoang Le Date: Mon, 21 Mar 2022 04:22:29 +0000 (+0700) Subject: tipc: fix the timer expires after interval 100ms X-Git-Tag: baikal/mips/sdk6.1~6170^2^2~1 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=764687d91c3c200a72348228b28a90aacc3ac599;p=kernel.git tipc: fix the timer expires after interval 100ms In the timer callback function tipc_sk_timeout(), we're trying to reschedule another timeout to retransmit a setup request if destination link is congested. But we use the incorrect timeout value (msecs_to_jiffies(100)) instead of (jiffies + msecs_to_jiffies(100)), so that the timer expires immediately, it's irrelevant for original description. In this commit we correct the timeout value in sk_reset_timer() Fixes: 50ca3278576e ("tipc: buffer overflow handling in listener socket") Acked-by: Ying Xue Signed-off-by: Hoang Le Link: https://lore.kernel.org/r/20220321042229.314288-1-hoang.h.le@dektech.com.au Signed-off-by: Paolo Abeni --- diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 7545321c3440b..17f8c523e33b0 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2852,7 +2852,8 @@ static void tipc_sk_retry_connect(struct sock *sk, struct sk_buff_head *list) /* Try again later if dest link is congested */ if (tsk->cong_link_cnt) { - sk_reset_timer(sk, &sk->sk_timer, msecs_to_jiffies(100)); + sk_reset_timer(sk, &sk->sk_timer, + jiffies + msecs_to_jiffies(100)); return; } /* Prepare SYN for retransmit */