]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: don't wait for send buffer space when data was already sent
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 30 Jan 2019 17:51:03 +0000 (18:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2019 22:45:44 +0000 (14:45 -0800)
commiteccfbeff78b82545f537d970ce4faabd3a56d41b
tree6cc0d0ef528ba0391f5bc36d7829bb5357a8fb3c
parent6ada3b8a069822380ed27d8ac3c35b80b58f020a
net/smc: don't wait for send buffer space when data was already sent

When there is no more send buffer space and at least 1 byte was already
sent then return to user space. The wait is only done when no data was
sent by the sendmsg() call.
This fixes smc_tx_sendmsg() which tried to always send all user data and
started to wait for free send buffer space when needed. During this wait
the user space program was blocked in the sendmsg() call and hence not
able to receive incoming data. When both sides were in such a situation
then the connection stalled forever.

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