Skip to content

Commit 6a7d8cf

Browse files
Hoang LePaolo Abeni
authored andcommitted
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: 6787927 ("tipc: buffer overflow handling in listener socket") Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au> Link: https://lore.kernel.org/r/20220321042229.314288-1-hoang.h.le@dektech.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 6b3c745 commit 6a7d8cf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

net/tipc/socket.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2852,7 +2852,8 @@ static void tipc_sk_retry_connect(struct sock *sk, struct sk_buff_head *list)
28522852

28532853
/* Try again later if dest link is congested */
28542854
if (tsk->cong_link_cnt) {
2855-
sk_reset_timer(sk, &sk->sk_timer, msecs_to_jiffies(100));
2855+
sk_reset_timer(sk, &sk->sk_timer,
2856+
jiffies + msecs_to_jiffies(100));
28562857
return;
28572858
}
28582859
/* Prepare SYN for retransmit */

0 commit comments

Comments
 (0)