net/smc: fix non-blocking connect problem
authorUrsula Braun <ubraun@linux.ibm.com>
Tue, 18 Sep 2018 13:46:34 +0000 (15:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2018 03:11:43 +0000 (20:11 -0700)
commit648a5a7aed346c3b8fe7c32a835edfb0dfbf4451
tree23429e17d25b1036bc1f64f947b025952cbac349
parent2fe397a3959de8a472f165e6d152f64cb77fa2cc
net/smc: fix non-blocking connect problem

In state SMC_INIT smc_poll() delegates polling to the internal
CLC socket. This means, once the connect worker has finished
its kernel_connect() step, the poll wake-up may occur. This is not
intended. The wake-up should occur from the wake up call in
smc_connect_work() after __smc_connect() has finished.
Thus in state SMC_INIT this patch now calls sock_poll_wait() on the
main SMC socket.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c