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:55 +0200
commit43fe477fbb41af9854ecd58b9298f15d0d3e4bf6 (patch)
tree65743e96ff740630a293161f69ece73e055973c8
parent26599cba381eaf602bde23482c356f95e94dbfb1 (diff)
rxrpc: Don't treat call aborts as conn aborts (git-fixes).
-rw-r--r--patches.fixes/0013-rxrpc-Don-t-treat-call-aborts-as-conn-aborts.patch60
-rw-r--r--series.conf1
2 files changed, 61 insertions, 0 deletions
diff --git a/patches.fixes/0013-rxrpc-Don-t-treat-call-aborts-as-conn-aborts.patch b/patches.fixes/0013-rxrpc-Don-t-treat-call-aborts-as-conn-aborts.patch
new file mode 100644
index 0000000000..63b78cf985
--- /dev/null
+++ b/patches.fixes/0013-rxrpc-Don-t-treat-call-aborts-as-conn-aborts.patch
@@ -0,0 +1,60 @@
+From: David Howells <dhowells@redhat.com>
+Subject: rxrpc: Don't treat call aborts as conn aborts
+Patch-mainline: v4.17-rc1
+Git-commit: 57b0c9d49b94bbeb53649b7fbd264603c1ebd585
+References: git-fixes
+
+If a call-level abort is received for the previous call to complete on a
+connection channel, then that abort is queued for the connection processor
+to handle. Unfortunately, the connection processor then assumes without
+checking that the abort is connection-level (ie. callNumber is 0) and
+distributes it over all active calls on that connection, thereby
+incorrectly aborting them.
+
+Fix this by discarding aborts aimed at a completed call.
+
+Further, discard all packets aimed at a call that's complete if there's
+currently an active call on a channel, since the DATA packets associated
+with the new call automatically terminate the old call.
+
+Fixes: 18bfeba50dfd ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor")
+Reported-by: Marc Dionne <marc.dionne@auristor.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Acked-by: Denis Kirjanov <dkirjanov@suse.com>
+---
+ net/rxrpc/input.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
+index 45dba732a3b4..8d41f8b24abb 100644
+--- a/net/rxrpc/input.c
++++ b/net/rxrpc/input.c
+@@ -1168,16 +1168,19 @@ void rxrpc_data_ready(struct sock *udp_sk)
+ goto discard_unlock;
+
+ if (sp->hdr.callNumber == chan->last_call) {
+- /* For the previous service call, if completed successfully, we
+- * discard all further packets.
++ if (chan->call ||
++ sp->hdr.type == RXRPC_PACKET_TYPE_ABORT)
++ goto discard_unlock;
++
++ /* For the previous service call, if completed
++ * successfully, we discard all further packets.
+ */
+ if (rxrpc_conn_is_service(conn) &&
+- (chan->last_type == RXRPC_PACKET_TYPE_ACK ||
+- sp->hdr.type == RXRPC_PACKET_TYPE_ABORT))
++ chan->last_type == RXRPC_PACKET_TYPE_ACK)
+ goto discard_unlock;
+
+- /* But otherwise we need to retransmit the final packet from
+- * data cached in the connection record.
++ /* But otherwise we need to retransmit the final packet
++ * from data cached in the connection record.
+ */
+ rxrpc_post_packet_to_conn(conn, skb);
+ goto out_unlock;
+--
+2.12.3
+
diff --git a/series.conf b/series.conf
index 2508cd690d..262c1f7a8b 100644
--- a/series.conf
+++ b/series.conf
@@ -14822,6 +14822,7 @@
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.fixes/0013-rxrpc-Don-t-treat-call-aborts-as-conn-aborts.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