]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: increase timeout in tipc_sk_enqueue()
authorHoang Le <hoang.h.le@dektech.com.au>
Mon, 13 Sep 2021 09:28:52 +0000 (16:28 +0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Sep 2021 11:43:10 +0000 (12:43 +0100)
commit20471ae5a822e2099bd01fca20709035f5ee785d
tree3a241657c652e4b5283f33b880bec1f0ac92c908
parentdc1080d666f4d03850364120ffe05ddec7a61f84
tipc: increase timeout in tipc_sk_enqueue()

In tipc_sk_enqueue() we use hardcoded 2 jiffies to extract
socket buffer from generic queue to particular socket.
The 2 jiffies is too short in case there are other high priority
tasks get CPU cycles for multiple jiffies update. As result, no
buffer could be enqueued to particular socket.

To solve this, we switch to use constant timeout 20msecs.
Then, the function will be expired between 2 jiffies (CONFIG_100HZ)
and 20 jiffies (CONFIG_1000HZ).

Fixes: 79db216a1c03 ("tipc: resolve race problem at unicast message reception")
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c