From: Greg Kroah-Hartman Date: Tue, 7 Apr 2020 09:16:45 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.4.31~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44d0dd972eff9ea5801d6f0de8fabfc6f5febcac;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: net-fix-tx-hash-bound-checking.patch rxrpc-fix-sendmsg-msg_waitall-handling.patch --- 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 index 00000000000..4cc61490123 --- /dev/null +++ b/queue-4.19/net-fix-tx-hash-bound-checking.patch @@ -0,0 +1,42 @@ +From 6e11d1578fba8d09d03a286740ffcf336d53928c Mon Sep 17 00:00:00 2001 +From: Amritha Nambiar +Date: Mon, 24 Feb 2020 10:56:00 -0800 +Subject: net: Fix Tx hash bound checking + +From: Amritha Nambiar + +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 +Reviewed-by: Alexander Duyck +Reviewed-by: Sridhar Samudrala +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..2ceb6f34a20 --- /dev/null +++ b/queue-4.19/rxrpc-fix-sendmsg-msg_waitall-handling.patch @@ -0,0 +1,34 @@ +From 498b577660f08cef5d9e78e0ed6dcd4c0939e98c Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Fri, 13 Mar 2020 17:30:27 +0000 +Subject: rxrpc: Fix sendmsg(MSG_WAITALL) handling + +From: David Howells + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-4.19/series b/queue-4.19/series index 99a35f6a8bf..1726d993544 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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