Skip to content

Commit 12db3c8

Browse files
Tung Nguyendavem330
authored andcommitted
tipc: fix wrong timeout input for tipc_wait_for_cond()
In function __tipc_shutdown(), the timeout value passed to tipc_wait_for_cond() is not jiffies. This commit fixes it by converting that value from milliseconds to jiffies. Fixes: 365ad35 ("tipc: reduce risk of user starvation during link congestion") Signed-off-by: Tung Nguyen <[email protected]> Acked-by: Jon Maloy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 91a4a3e commit 12db3c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ static void __tipc_shutdown(struct socket *sock, int error)
532532
struct sock *sk = sock->sk;
533533
struct tipc_sock *tsk = tipc_sk(sk);
534534
struct net *net = sock_net(sk);
535-
long timeout = CONN_TIMEOUT_DEFAULT;
535+
long timeout = msecs_to_jiffies(CONN_TIMEOUT_DEFAULT);
536536
u32 dnode = tsk_peer_node(tsk);
537537
struct sk_buff *skb;
538538

0 commit comments

Comments
 (0)