Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-05-02 13:49:28 +0200
committerDenis Kirjanov <dkirjanov@suse.com>2019-05-02 13:49:53 +0200
commit26599cba381eaf602bde23482c356f95e94dbfb1 (patch)
treecbfe4c94affc204032f6fb7b233dda4655ee49fb
parent5588bbdfaace975a5ac390d57edb1d436b103f34 (diff)
rxrpc: Fix Tx ring annotation after initial Tx failure
(git-fixes).
-rw-r--r--patches.fixes/0012-rxrpc-Fix-Tx-ring-annotation-after-initial-Tx-failur.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.fixes/0012-rxrpc-Fix-Tx-ring-annotation-after-initial-Tx-failur.patch b/patches.fixes/0012-rxrpc-Fix-Tx-ring-annotation-after-initial-Tx-failur.patch
new file mode 100644
index 0000000000..55b2a29c24
--- /dev/null
+++ b/patches.fixes/0012-rxrpc-Fix-Tx-ring-annotation-after-initial-Tx-failur.patch
@@ -0,0 +1,42 @@
+From: David Howells <dhowells@redhat.com>
+Subject: rxrpc: Fix Tx ring annotation after initial Tx failure
+Patch-mainline: v4.17-rc1
+Git-commit: 03877bf6a30cca7d4bc3ffabd3c3e9464a7a1a19
+References: git-fixes
+
+rxrpc calls have a ring of packets that are awaiting ACK or retransmission
+and a parallel ring of annotations that tracks the state of those packets.
+If the initial transmission of a packet on the underlying UDP socket fails
+then the packet annotation is marked for resend - but the setting of this
+mark accidentally erases the last-packet mark also stored in the same
+annotation slot. If this happens, a call won't switch out of the Tx phase
+when all the packets have been transmitted.
+
+Fix this by retaining the last-packet mark and only altering the packet
+state.
+
+Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code")
+Signed-off-by: David Howells <dhowells@redhat.com>
+Acked-by: Denis Kirjanov <dkirjanov@suse.com>
+---
+ net/rxrpc/sendmsg.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
+index 439ebc24a597..301f73e7b111 100644
+--- a/net/rxrpc/sendmsg.c
++++ b/net/rxrpc/sendmsg.c
+@@ -83,7 +83,9 @@ static inline void rxrpc_instant_resend(struct rxrpc_call *call, int ix)
+ spin_lock_bh(&call->lock);
+
+ if (call->state < RXRPC_CALL_COMPLETE) {
+- call->rxtx_annotations[ix] = RXRPC_TX_ANNO_RETRANS;
++ call->rxtx_annotations[ix] =
++ (call->rxtx_annotations[ix] & RXRPC_TX_ANNO_LAST) |
++ RXRPC_TX_ANNO_RETRANS;
+ if (!test_and_set_bit(RXRPC_CALL_EV_RESEND, &call->events))
+ rxrpc_queue_call(call);
+ }
+--
+2.12.3
+
diff --git a/series.conf b/series.conf
index 68e2697799..2508cd690d 100644
--- a/series.conf
+++ b/series.conf
@@ -14821,6 +14821,7 @@
patches.drivers/net-thunderx-add-workqueue-control-structures-for-ha.patch
patches.drivers/net-thunderx-add-ndo_set_rx_mode-callback-implementa.patch
patches.drivers/net-hns3-remove-unnecessary-pci_set_drvdata-and-devm.patch
+ patches.fixes/0012-rxrpc-Fix-Tx-ring-annotation-after-initial-Tx-failur.patch
patches.drivers/net-mlx5-Eliminate-query-xsrq-dead-code.patch
patches.drivers/bnxt_en-Update-firmware-interface-to-1.9.1.15.patch
patches.drivers/bnxt_en-Adjust-default-rings-for-multi-port-NICs.patch