From: Greg Kroah-Hartman Date: Thu, 17 Sep 2020 15:25:33 +0000 (+0200) Subject: 5.8-stable patches X-Git-Tag: v4.4.237~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a29a2dbfc4facae02f26f2d9e69c6863b12830d;p=thirdparty%2Fkernel%2Fstable-queue.git 5.8-stable patches added patches: dt-bindings-pci-intel-lgm-pcie-fix-matching-on-all-snps-dw-pcie-instances.patch hv_netvsc-remove-unlikely-from-netvsc_select_queue.patch loop-set-correct-device-size-when-using-loop_configure.patch mptcp-sendmsg-reset-iter-on-error.patch net-handle-the-return-value-of-pskb_carve_frag_list-correctly.patch powerpc-add-power10-raw-mode-cputable-entry.patch --- diff --git a/queue-5.8/dt-bindings-pci-intel-lgm-pcie-fix-matching-on-all-snps-dw-pcie-instances.patch b/queue-5.8/dt-bindings-pci-intel-lgm-pcie-fix-matching-on-all-snps-dw-pcie-instances.patch new file mode 100644 index 00000000000..be9a41b2a1c --- /dev/null +++ b/queue-5.8/dt-bindings-pci-intel-lgm-pcie-fix-matching-on-all-snps-dw-pcie-instances.patch @@ -0,0 +1,40 @@ +From a326462cba6ae7398a5c997dddf3bea39555a825 Mon Sep 17 00:00:00 2001 +From: Rob Herring +Date: Wed, 19 Aug 2020 11:58:16 -0600 +Subject: dt-bindings: PCI: intel,lgm-pcie: Fix matching on all snps,dw-pcie instances + +From: Rob Herring + +commit a326462cba6ae7398a5c997dddf3bea39555a825 upstream. + +The intel,lgm-pcie binding is matching on all snps,dw-pcie instances +which is wrong. Add a custom 'select' entry to fix this. + +Fixes: e54ea45a4955 ("dt-bindings: PCI: intel: Add YAML schemas for the PCIe RC controller") +Cc: Bjorn Helgaas +Cc: linux-pci@vger.kernel.org +Reviewed-by: Dilip Kota +Signed-off-by: Rob Herring +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/devicetree/bindings/pci/intel-gw-pcie.yaml | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/Documentation/devicetree/bindings/pci/intel-gw-pcie.yaml ++++ b/Documentation/devicetree/bindings/pci/intel-gw-pcie.yaml +@@ -9,6 +9,14 @@ title: PCIe RC controller on Intel Gatew + maintainers: + - Dilip Kota + ++select: ++ properties: ++ compatible: ++ contains: ++ const: intel,lgm-pcie ++ required: ++ - compatible ++ + properties: + compatible: + items: diff --git a/queue-5.8/hv_netvsc-remove-unlikely-from-netvsc_select_queue.patch b/queue-5.8/hv_netvsc-remove-unlikely-from-netvsc_select_queue.patch new file mode 100644 index 00000000000..542eb367724 --- /dev/null +++ b/queue-5.8/hv_netvsc-remove-unlikely-from-netvsc_select_queue.patch @@ -0,0 +1,34 @@ +From 4d820543c54c47a2bd3c95ddbf52f83c89a219a0 Mon Sep 17 00:00:00 2001 +From: Haiyang Zhang +Date: Thu, 20 Aug 2020 14:53:14 -0700 +Subject: hv_netvsc: Remove "unlikely" from netvsc_select_queue + +From: Haiyang Zhang + +commit 4d820543c54c47a2bd3c95ddbf52f83c89a219a0 upstream. + +When using vf_ops->ndo_select_queue, the number of queues of VF is +usually bigger than the synthetic NIC. This condition may happen +often. +Remove "unlikely" from the comparison of ndev->real_num_tx_queues. + +Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF") +Signed-off-by: Haiyang Zhang +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/hyperv/netvsc_drv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/hyperv/netvsc_drv.c ++++ b/drivers/net/hyperv/netvsc_drv.c +@@ -367,7 +367,7 @@ static u16 netvsc_select_queue(struct ne + } + rcu_read_unlock(); + +- while (unlikely(txq >= ndev->real_num_tx_queues)) ++ while (txq >= ndev->real_num_tx_queues) + txq -= ndev->real_num_tx_queues; + + return txq; diff --git a/queue-5.8/loop-set-correct-device-size-when-using-loop_configure.patch b/queue-5.8/loop-set-correct-device-size-when-using-loop_configure.patch new file mode 100644 index 00000000000..56bfdfa8a66 --- /dev/null +++ b/queue-5.8/loop-set-correct-device-size-when-using-loop_configure.patch @@ -0,0 +1,46 @@ +From 79e5dc59e2974a48764269fa9ff544ae8ffe3338 Mon Sep 17 00:00:00 2001 +From: Martijn Coenen +Date: Tue, 25 Aug 2020 09:18:29 +0200 +Subject: loop: Set correct device size when using LOOP_CONFIGURE + +From: Martijn Coenen + +commit 79e5dc59e2974a48764269fa9ff544ae8ffe3338 upstream. + +The device size calculation was done before processing the loop +configuration, which meant that the we set the size on the underlying +block device incorrectly in case lo_offset/lo_sizelimit were set in the +configuration. Delay computing the size until we've setup the device +parameters correctly. + +Fixes: 3448914e8cc5("loop: Add LOOP_CONFIGURE ioctl") +Reported-by: Lennart Poettering +Tested-by: Yang Xu +Signed-off-by: Martijn Coenen +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/loop.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/block/loop.c ++++ b/drivers/block/loop.c +@@ -1114,8 +1114,6 @@ static int loop_configure(struct loop_de + mapping = file->f_mapping; + inode = mapping->host; + +- size = get_loop_size(lo, file); +- + if ((config->info.lo_flags & ~LOOP_CONFIGURE_SETTABLE_FLAGS) != 0) { + error = -EINVAL; + goto out_unlock; +@@ -1165,6 +1163,8 @@ static int loop_configure(struct loop_de + loop_update_rotational(lo); + loop_update_dio(lo); + loop_sysfs_init(lo); ++ ++ size = get_loop_size(lo, file); + loop_set_size(lo, size); + + set_blocksize(bdev, S_ISBLK(inode->i_mode) ? diff --git a/queue-5.8/mptcp-sendmsg-reset-iter-on-error.patch b/queue-5.8/mptcp-sendmsg-reset-iter-on-error.patch new file mode 100644 index 00000000000..5452ca92d8a --- /dev/null +++ b/queue-5.8/mptcp-sendmsg-reset-iter-on-error.patch @@ -0,0 +1,53 @@ +From 35759383133f64d90eba120a0d3efe8f71241650 Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Fri, 14 Aug 2020 15:56:34 +0200 +Subject: mptcp: sendmsg: reset iter on error + +From: Florian Westphal + +commit 35759383133f64d90eba120a0d3efe8f71241650 upstream. + +Once we've copied data from the iterator we need to revert in case we +end up not sending any data. + +This bug doesn't trigger with normal 'poll' based tests, because +we only feed a small chunk of data to kernel after poll indicated +POLLOUT. With blocking IO and large writes this triggers. Receiver +ends up with less data than it should get. + +Fixes: 72511aab95c94d ("mptcp: avoid blocking in tcp_sendpages") +Signed-off-by: Florian Westphal +Reviewed-by: Mat Martineau +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/mptcp/protocol.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/net/mptcp/protocol.c ++++ b/net/mptcp/protocol.c +@@ -605,8 +605,10 @@ static int mptcp_sendmsg_frag(struct soc + if (!psize) + return -EINVAL; + +- if (!sk_wmem_schedule(sk, psize + dfrag->overhead)) ++ if (!sk_wmem_schedule(sk, psize + dfrag->overhead)) { ++ iov_iter_revert(&msg->msg_iter, psize); + return -ENOMEM; ++ } + } else { + offset = dfrag->offset; + psize = min_t(size_t, dfrag->data_len, avail_size); +@@ -617,8 +619,10 @@ static int mptcp_sendmsg_frag(struct soc + */ + ret = do_tcp_sendpages(ssk, page, offset, psize, + msg->msg_flags | MSG_SENDPAGE_NOTLAST | MSG_DONTWAIT); +- if (ret <= 0) ++ if (ret <= 0) { ++ iov_iter_revert(&msg->msg_iter, psize); + return ret; ++ } + + frag_truesize += ret; + if (!retransmission) { diff --git a/queue-5.8/net-handle-the-return-value-of-pskb_carve_frag_list-correctly.patch b/queue-5.8/net-handle-the-return-value-of-pskb_carve_frag_list-correctly.patch new file mode 100644 index 00000000000..850754f7321 --- /dev/null +++ b/queue-5.8/net-handle-the-return-value-of-pskb_carve_frag_list-correctly.patch @@ -0,0 +1,40 @@ +From eabe861881a733fc84f286f4d5a1ffaddd4f526f Mon Sep 17 00:00:00 2001 +From: Miaohe Lin +Date: Sat, 15 Aug 2020 04:46:41 -0400 +Subject: net: handle the return value of pskb_carve_frag_list() correctly + +From: Miaohe Lin + +commit eabe861881a733fc84f286f4d5a1ffaddd4f526f upstream. + +pskb_carve_frag_list() may return -ENOMEM in pskb_carve_inside_nonlinear(). +we should handle this correctly or we would get wrong sk_buff. + +Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function") +Signed-off-by: Miaohe Lin +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/core/skbuff.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/net/core/skbuff.c ++++ b/net/core/skbuff.c +@@ -5988,9 +5988,13 @@ static int pskb_carve_inside_nonlinear(s + if (skb_has_frag_list(skb)) + skb_clone_fraglist(skb); + +- if (k == 0) { +- /* split line is in frag list */ +- pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask); ++ /* split line is in frag list */ ++ if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) { ++ /* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. */ ++ if (skb_has_frag_list(skb)) ++ kfree_skb_list(skb_shinfo(skb)->frag_list); ++ kfree(data); ++ return -ENOMEM; + } + skb_release_data(skb); + diff --git a/queue-5.8/powerpc-add-power10-raw-mode-cputable-entry.patch b/queue-5.8/powerpc-add-power10-raw-mode-cputable-entry.patch new file mode 100644 index 00000000000..7292814f1b3 --- /dev/null +++ b/queue-5.8/powerpc-add-power10-raw-mode-cputable-entry.patch @@ -0,0 +1,63 @@ +From 327da008e65a25b8206b36b7fc0c9e4edbb36a58 Mon Sep 17 00:00:00 2001 +From: Madhavan Srinivasan +Date: Mon, 17 Aug 2020 06:26:18 +0530 +Subject: powerpc: Add POWER10 raw mode cputable entry + +From: Madhavan Srinivasan + +commit 327da008e65a25b8206b36b7fc0c9e4edbb36a58 upstream. + +Add a raw mode cputable entry for POWER10. Copies most of the fields +from commit a3ea40d5c736 ("powerpc: Add POWER10 architected mode") +except for oprofile_cpu_type, machine_check_early, pvr_mask and +pvr_mask fields. On bare metal systems we use DT CPU features, which +doesn't need a cputable entry. But in VMs we still rely on the raw +cputable entry to set the correct values for the PMU related fields. + +Fixes: a3ea40d5c736 ("powerpc: Add POWER10 architected mode") +Signed-off-by: Madhavan Srinivasan +[mpe: Reorder vs cleanup patch and add Fixes tag] +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20200817005618.3305028-2-maddy@linux.ibm.com +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/cputable.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- a/arch/powerpc/kernel/cputable.c ++++ b/arch/powerpc/kernel/cputable.c +@@ -75,6 +75,7 @@ extern void __restore_cpu_power10(void); + extern long __machine_check_early_realmode_p7(struct pt_regs *regs); + extern long __machine_check_early_realmode_p8(struct pt_regs *regs); + extern long __machine_check_early_realmode_p9(struct pt_regs *regs); ++extern long __machine_check_early_realmode_p10(struct pt_regs *regs); + #endif /* CONFIG_PPC64 */ + #if defined(CONFIG_E500) + extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec); +@@ -541,6 +542,25 @@ static struct cpu_spec __initdata cpu_sp + .machine_check_early = __machine_check_early_realmode_p9, + .platform = "power9", + }, ++ { /* Power10 */ ++ .pvr_mask = 0xffff0000, ++ .pvr_value = 0x00800000, ++ .cpu_name = "POWER10 (raw)", ++ .cpu_features = CPU_FTRS_POWER10, ++ .cpu_user_features = COMMON_USER_POWER10, ++ .cpu_user_features2 = COMMON_USER2_POWER10, ++ .mmu_features = MMU_FTRS_POWER10, ++ .icache_bsize = 128, ++ .dcache_bsize = 128, ++ .num_pmcs = 6, ++ .pmc_type = PPC_PMC_IBM, ++ .oprofile_cpu_type = "ppc64/power10", ++ .oprofile_type = PPC_OPROFILE_INVALID, ++ .cpu_setup = __setup_cpu_power10, ++ .cpu_restore = __restore_cpu_power10, ++ .machine_check_early = __machine_check_early_realmode_p10, ++ .platform = "power10", ++ }, + { /* Cell Broadband Engine */ + .pvr_mask = 0xffff0000, + .pvr_value = 0x00700000, diff --git a/queue-5.8/series b/queue-5.8/series index 70ffaf8d73a..541cccdb401 100644 --- a/queue-5.8/series +++ b/queue-5.8/series @@ -1,2 +1,8 @@ rdma-bnxt_re-restrict-the-max_gids-to-256.patch dt-bindings-spi-fix-spi-bcm-qspi-compatible-ordering.patch +mptcp-sendmsg-reset-iter-on-error.patch +net-handle-the-return-value-of-pskb_carve_frag_list-correctly.patch +powerpc-add-power10-raw-mode-cputable-entry.patch +dt-bindings-pci-intel-lgm-pcie-fix-matching-on-all-snps-dw-pcie-instances.patch +hv_netvsc-remove-unlikely-from-netvsc_select_queue.patch +loop-set-correct-device-size-when-using-loop_configure.patch