]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 18:19:20 +0000 (10:19 -0800)
commit27ffc38f897369d1c2cc7eb0dded4039e81ef3b2
tree3190bfbcee4fe74e484be25bd7835d31fd362cc3
parentff74a06e3544d179819d41c801fa62d53c5a2cdc
net/smc: fix smc_poll in SMC_INIT state

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: 29e9a70c01d6 ("net/smc: urgent data support")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc.h