diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c index 3144b4b1fe29..495fb1354728 100644 --- a/net/smc/smc_tx.c +++ b/net/smc/smc_tx.c @@ -249,6 +249,13 @@ int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len) rc = memcpy_from_msg(sndbuf_base + chunk_off, msg, chunk_len); if (rc) { + if (chunk) { + /* send_done counts the first chunk: + * queue it and retry the rest + */ + copylen -= chunk_len; + break; + } smc_sndbuf_sync_sg_for_device(conn); if (send_done) return send_done;