]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix sleeping in tipc accept routine
authorHoang Le <hoang.h.le@dektech.com.au>
Fri, 23 Jul 2021 02:25:34 +0000 (09:25 +0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 15:36:37 +0000 (16:36 +0100)
commit5c82de5c084c4bdba55f0e37b9ccdddc5d50d271
tree6a61cf06b653cfa645e73b6d6f6a26184192d23c
parent47ae4c8ad3f1ab447918d5e05f959fa07cf2b81d
tipc: fix sleeping in tipc accept routine

The release_sock() is blocking function, it would change the state
after sleeping. In order to evaluate the stated condition outside
the socket lock context, switch to use wait_woken() instead.

Fixes: d2f79843038dc ("tipc: standardize accept routine")
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