net/smc: fix smc_poll in SMC_INIT state
authorUrsula Braun <ubraun@linux.ibm.com>
Thu, 21 Feb 2019 11:56:54 +0000 (12:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 12:11:55 +0000 (13:11 +0100)
commitad023bf2ed0e6c7cae97b0ed11ca690e55fa5b9d
treebbddac686ea3d4063869d2d64385afbf24940ac3
parent9d8945e0f17518abf764262f1ffc1f84cc4e6441
net/smc: fix smc_poll in SMC_INIT state

[ Upstream commit d7cf4a3bf3a83c977a29055e1c4ffada7697b31f ]

smc_poll() returns with mask bit EPOLLPRI if the connection urg_state
is SMC_URG_VALID. Since SMC_URG_VALID is zero, smc_poll signals
EPOLLPRI errorneously if called in state SMC_INIT before the connection
is created, for instance in a non-blocking connect scenario.

This patch switches to non-zero values for the urg states.

Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
Fixes: de8474eb9d50 ("net/smc: urgent data support")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/smc/smc.h