* [net] tipc: fix the timer expires after interval 100ms
@ 2022-03-21 4:22 Hoang Le
2022-03-22 10:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Hoang Le @ 2022-03-21 4:22 UTC (permalink / raw)
To: jmaloy, maloy, ying.xue, tung.q.nguyen, tuong.t.lien, duc.x.doan,
kuba, netdev, tipc-discussion
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: 6787927475e5 ("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>
---
net/tipc/socket.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 7545321c3440..17f8c523e33b 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 */
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net] tipc: fix the timer expires after interval 100ms
2022-03-21 4:22 [net] tipc: fix the timer expires after interval 100ms Hoang Le
@ 2022-03-22 10:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-22 10:10 UTC (permalink / raw)
To: Hoang Le
Cc: jmaloy, maloy, ying.xue, tung.q.nguyen, tuong.t.lien, duc.x.doan,
kuba, netdev, tipc-discussion
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 21 Mar 2022 11:22:29 +0700 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net] tipc: fix the timer expires after interval 100ms
https://git.kernel.org/netdev/net/c/6a7d8cff4a33
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-22 10:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 4:22 [net] tipc: fix the timer expires after interval 100ms Hoang Le
2022-03-22 10:10 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.