Commit 818aa3ac authored by Ursula Braun's avatar Ursula Braun Committed by Xie XiuQi
Browse files

net/smc: fix smc_poll in SMC_INIT state



mainline inclusion
from mainline-5.0
commit d7cf4a3b
category: bugfix
bugzilla: 10930
CVE: NA

-------------------------------------------------

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: default avatarKarsten Graul <kgraul@linux.ibm.com>
Fixes: de8474eb ("net/smc: urgent data support")
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarZhiqiang Liu <liuzhiqiang26@huawei.com>
Reviewed-by: default avatarWenan Mao <maowenan@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 645488bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment