summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorTung Nguyen <tung.q.nguyen@dektech.com.au>2019-11-28 04:10:07 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-29 08:09:14 +0100
commit12db3c8083fcab4270866a88191933f2d9f24f89 (patch)
treeab550300560ce90590087070b8bc88c56897e16c /net/tipc
parenttipc: fix wrong socket reference counter after tipc_sk_timeout() returns (diff)
downloadlinux-12db3c8083fcab4270866a88191933f2d9f24f89.tar.xz
linux-12db3c8083fcab4270866a88191933f2d9f24f89.zip
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: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index fb5595081a05..da5fb84852a6 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -532,7 +532,7 @@ static void __tipc_shutdown(struct socket *sock, int error)
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
struct net *net = sock_net(sk);
- long timeout = CONN_TIMEOUT_DEFAULT;
+ long timeout = msecs_to_jiffies(CONN_TIMEOUT_DEFAULT);
u32 dnode = tsk_peer_node(tsk);
struct sk_buff *skb;