]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Apr 2020 09:16:45 +0000 (11:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Apr 2020 09:16:45 +0000 (11:16 +0200)
added patches:
net-fix-tx-hash-bound-checking.patch
rxrpc-fix-sendmsg-msg_waitall-handling.patch

queue-4.19/net-fix-tx-hash-bound-checking.patch [new file with mode: 0644]
queue-4.19/rxrpc-fix-sendmsg-msg_waitall-handling.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/net-fix-tx-hash-bound-checking.patch b/queue-4.19/net-fix-tx-hash-bound-checking.patch
new file mode 100644 (file)
index 0000000..4cc6149
--- /dev/null
@@ -0,0 +1,42 @@
+From 6e11d1578fba8d09d03a286740ffcf336d53928c Mon Sep 17 00:00:00 2001
+From: Amritha Nambiar <amritha.nambiar@intel.com>
+Date: Mon, 24 Feb 2020 10:56:00 -0800
+Subject: net: Fix Tx hash bound checking
+
+From: Amritha Nambiar <amritha.nambiar@intel.com>
+
+commit 6e11d1578fba8d09d03a286740ffcf336d53928c upstream.
+
+Fixes the lower and upper bounds when there are multiple TCs and
+traffic is on the the same TC on the same device.
+
+The lower bound is represented by 'qoffset' and the upper limit for
+hash value is 'qcount + qoffset'. This gives a clean Rx to Tx queue
+mapping when there are multiple TCs, as the queue indices for upper TCs
+will be offset by 'qoffset'.
+
+v2: Fixed commit description based on comments.
+
+Fixes: 1b837d489e06 ("net: Revoke export for __skb_tx_hash, update it to just be static skb_tx_hash")
+Fixes: eadec877ce9c ("net: Add support for subordinate traffic classes to netdev_pick_tx")
+Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
+Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
+Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/core/dev.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -2854,6 +2854,8 @@ static u16 skb_tx_hash(const struct net_
+       if (skb_rx_queue_recorded(skb)) {
+               hash = skb_get_rx_queue(skb);
++              if (hash >= qoffset)
++                      hash -= qoffset;
+               while (unlikely(hash >= qcount))
+                       hash -= qcount;
+               return hash + qoffset;
diff --git a/queue-4.19/rxrpc-fix-sendmsg-msg_waitall-handling.patch b/queue-4.19/rxrpc-fix-sendmsg-msg_waitall-handling.patch
new file mode 100644 (file)
index 0000000..2ceb6f3
--- /dev/null
@@ -0,0 +1,34 @@
+From 498b577660f08cef5d9e78e0ed6dcd4c0939e98c Mon Sep 17 00:00:00 2001
+From: David Howells <dhowells@redhat.com>
+Date: Fri, 13 Mar 2020 17:30:27 +0000
+Subject: rxrpc: Fix sendmsg(MSG_WAITALL) handling
+
+From: David Howells <dhowells@redhat.com>
+
+commit 498b577660f08cef5d9e78e0ed6dcd4c0939e98c upstream.
+
+Fix the handling of sendmsg() with MSG_WAITALL for userspace to round the
+timeout for when a signal occurs up to at least two jiffies as a 1 jiffy
+timeout may end up being effectively 0 if jiffies wraps at the wrong time.
+
+Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals")
+Signed-off-by: David Howells <dhowells@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/rxrpc/sendmsg.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/rxrpc/sendmsg.c
++++ b/net/rxrpc/sendmsg.c
+@@ -62,8 +62,8 @@ static int rxrpc_wait_for_tx_window_noni
+       rtt = READ_ONCE(call->peer->rtt);
+       rtt2 = nsecs_to_jiffies64(rtt) * 2;
+-      if (rtt2 < 1)
+-              rtt2 = 1;
++      if (rtt2 < 2)
++              rtt2 = 2;
+       timeout = rtt2;
+       tx_start = READ_ONCE(call->tx_hard_ack);
index 99a35f6a8bfc9678357ce33743464c6796fac0e1..1726d9935445b496b44840d369e0522cdfe88ee1 100644 (file)
@@ -19,3 +19,5 @@ mei-me-add-cedar-fork-device-ids.patch
 extcon-axp288-add-wakeup-support.patch
 power-supply-axp288_charger-add-special-handling-for-hp-pavilion-x2-10.patch
 alsa-hda-ca0132-add-recon3di-quirk-to-handle-integrated-sound-on-evga-x99-classified-motherboard.patch
+rxrpc-fix-sendmsg-msg_waitall-handling.patch
+net-fix-tx-hash-bound-checking.patch