]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
authorGuangguan Wang <guangguan.wang@linux.alibaba.com>
Thu, 12 May 2022 03:08:20 +0000 (11:08 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 May 2022 17:01:36 +0000 (10:01 -0700)
commit286425b2aef0ef3383792fa98fd8e226d99199e2
treef272f3a7a5b3eddd3a352720ddd717ebba46c143
parenta137b5a8da97620d61dc5c6e6cf6358dbe79750d
net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending

Non blocking sendmsg will return -EAGAIN when any signal pending
and no send space left, while non blocking recvmsg return -EINTR
when signal pending and no data received. This may makes confused.
As TCP returns -EAGAIN in the conditions described above. Align the
behavior of smc with TCP.

Fixes: 76418fcc0bdb ("net/smc: add receive timeout check")
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20220512030820.73848-1-guangguan.wang@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/smc_rx.c