]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: Fix missing connection request handling
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Wed, 26 Apr 2017 08:05:00 +0000 (10:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Apr 2017 16:20:42 +0000 (12:20 -0400)
commitf4cbb05dfdb011b0e464e7f1478c8c84ff61fbea
treed4df7e1da29816011a2c74a592969288b391bfa2
parent71ab0367f368d38b65705644967ac707958ebe19
tipc: Fix missing connection request handling

In filter_connect, we use waitqueue_active() to check for any
connections to wakeup. But waitqueue_active() is missing memory
barriers while accessing the critical sections, leading to
inconsistent results.

In this commit, we replace this with an SMP safe wq_has_sleeper()
using the generic socket callback sk_data_ready().

Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c