]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:56 +0000 (14:21 -0300)
commitb9969db084dae739fe8a73ecac28e7871dceb9c8
tree91d13efcd99de9c8f96e1ff982f8473feb7676dc
parent02c9789ace201f5555415123c631621efbecc1fa
net/smc: don't wait for send buffer space when data was already sent

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit 6889b36da78a21a312d8b462c1fa25a03c2ff192 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/smc/smc_tx.c