From: Greg Kroah-Hartman Date: Thu, 29 Jun 2023 10:30:35 +0000 (+0200) Subject: 6.3-stable patches X-Git-Tag: v6.4.1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd08bf5f1b149147d7f7080aecf71a49baf807b1;p=thirdparty%2Fkernel%2Fstable-queue.git 6.3-stable patches added patches: can-isotp-isotp_sendmsg-fix-return-error-fix-on-tx-path.patch cpufreq-amd-pstate-make-amd-pstate-epp-driver-name-hyphenated.patch maple_tree-fix-potential-out-of-bounds-access-in-mas_wr_end_piv.patch --- diff --git a/queue-6.3/can-isotp-isotp_sendmsg-fix-return-error-fix-on-tx-path.patch b/queue-6.3/can-isotp-isotp_sendmsg-fix-return-error-fix-on-tx-path.patch new file mode 100644 index 00000000000..a615c511831 --- /dev/null +++ b/queue-6.3/can-isotp-isotp_sendmsg-fix-return-error-fix-on-tx-path.patch @@ -0,0 +1,44 @@ +From e38910c0072b541a91954682c8b074a93e57c09b Mon Sep 17 00:00:00 2001 +From: Oliver Hartkopp +Date: Wed, 7 Jun 2023 09:27:08 +0200 +Subject: can: isotp: isotp_sendmsg(): fix return error fix on TX path + +From: Oliver Hartkopp + +commit e38910c0072b541a91954682c8b074a93e57c09b upstream. + +With commit d674a8f123b4 ("can: isotp: isotp_sendmsg(): fix return +error on FC timeout on TX path") the missing correct return value in +the case of a protocol error was introduced. + +But the way the error value has been read and sent to the user space +does not follow the common scheme to clear the error after reading +which is provided by the sock_error() function. This leads to an error +report at the following write() attempt although everything should be +working. + +Fixes: d674a8f123b4 ("can: isotp: isotp_sendmsg(): fix return error on FC timeout on TX path") +Reported-by: Carsten Schmidt +Signed-off-by: Oliver Hartkopp +Link: https://lore.kernel.org/all/20230607072708.38809-1-socketcan@hartkopp.net +Cc: stable@vger.kernel.org +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman +--- + net/can/isotp.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/net/can/isotp.c ++++ b/net/can/isotp.c +@@ -1079,8 +1079,9 @@ wait_free_buffer: + if (err) + goto err_event_drop; + +- if (sk->sk_err) +- return -sk->sk_err; ++ err = sock_error(sk); ++ if (err) ++ return err; + } + + return size; diff --git a/queue-6.3/cpufreq-amd-pstate-make-amd-pstate-epp-driver-name-hyphenated.patch b/queue-6.3/cpufreq-amd-pstate-make-amd-pstate-epp-driver-name-hyphenated.patch new file mode 100644 index 00000000000..62ba2a1c99a --- /dev/null +++ b/queue-6.3/cpufreq-amd-pstate-make-amd-pstate-epp-driver-name-hyphenated.patch @@ -0,0 +1,36 @@ +From f4aad639302a07454dcb23b408dcadf8a9efb031 Mon Sep 17 00:00:00 2001 +From: Wyes Karny +Date: Mon, 12 Jun 2023 11:36:10 +0000 +Subject: cpufreq: amd-pstate: Make amd-pstate EPP driver name hyphenated + +From: Wyes Karny + +commit f4aad639302a07454dcb23b408dcadf8a9efb031 upstream. + +amd-pstate passive mode driver is hyphenated. So make amd-pstate active +mode driver consistent with that rename "amd_pstate_epp" to +"amd-pstate-epp". + +Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors") +Cc: All applicable +Reviewed-by: Gautham R. Shenoy +Signed-off-by: Wyes Karny +Acked-by: Huang Rui +Reviewed-by: Perry Yuan +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/cpufreq/amd-pstate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/cpufreq/amd-pstate.c ++++ b/drivers/cpufreq/amd-pstate.c +@@ -1272,7 +1272,7 @@ static struct cpufreq_driver amd_pstate_ + .online = amd_pstate_epp_cpu_online, + .suspend = amd_pstate_epp_suspend, + .resume = amd_pstate_epp_resume, +- .name = "amd_pstate_epp", ++ .name = "amd-pstate-epp", + .attr = amd_pstate_epp_attr, + }; + diff --git a/queue-6.3/maple_tree-fix-potential-out-of-bounds-access-in-mas_wr_end_piv.patch b/queue-6.3/maple_tree-fix-potential-out-of-bounds-access-in-mas_wr_end_piv.patch new file mode 100644 index 00000000000..a38bbf698b8 --- /dev/null +++ b/queue-6.3/maple_tree-fix-potential-out-of-bounds-access-in-mas_wr_end_piv.patch @@ -0,0 +1,57 @@ +From cd00dd2585c4158e81fdfac0bbcc0446afbad26d Mon Sep 17 00:00:00 2001 +From: Peng Zhang +Date: Sat, 6 May 2023 10:47:52 +0800 +Subject: maple_tree: fix potential out-of-bounds access in mas_wr_end_piv() + +From: Peng Zhang + +commit cd00dd2585c4158e81fdfac0bbcc0446afbad26d upstream. + +Check the write offset end bounds before using it as the offset into the +pivot array. This avoids a possible out-of-bounds access on the pivot +array if the write extends to the last slot in the node, in which case the +node maximum should be used as the end pivot. + +akpm: this doesn't affect any current callers, but new users of mapletree +may encounter this problem if backported into earlier kernels, so let's +fix it in -stable kernels in case of this. + +Link: https://lkml.kernel.org/r/20230506024752.2550-1-zhangpeng.00@bytedance.com +Fixes: 54a611b60590 ("Maple Tree: add new data structure") +Signed-off-by: Peng Zhang +Reviewed-by: Liam R. Howlett +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + lib/maple_tree.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +--- a/lib/maple_tree.c ++++ b/lib/maple_tree.c +@@ -4287,11 +4287,13 @@ done: + + static inline void mas_wr_end_piv(struct ma_wr_state *wr_mas) + { +- while ((wr_mas->mas->last > wr_mas->end_piv) && +- (wr_mas->offset_end < wr_mas->node_end)) +- wr_mas->end_piv = wr_mas->pivots[++wr_mas->offset_end]; ++ while ((wr_mas->offset_end < wr_mas->node_end) && ++ (wr_mas->mas->last > wr_mas->pivots[wr_mas->offset_end])) ++ wr_mas->offset_end++; + +- if (wr_mas->mas->last > wr_mas->end_piv) ++ if (wr_mas->offset_end < wr_mas->node_end) ++ wr_mas->end_piv = wr_mas->pivots[wr_mas->offset_end]; ++ else + wr_mas->end_piv = wr_mas->mas->max; + } + +@@ -4448,7 +4450,6 @@ static inline void *mas_wr_store_entry(s + } + + /* At this point, we are at the leaf node that needs to be altered. */ +- wr_mas->end_piv = wr_mas->r_max; + mas_wr_end_piv(wr_mas); + + if (!wr_mas->entry) diff --git a/queue-6.3/series b/queue-6.3/series index e37a22ed157..44c48b4009c 100644 --- a/queue-6.3/series +++ b/queue-6.3/series @@ -6,3 +6,6 @@ x86-smp-dont-access-non-existing-cpuid-leaf.patch x86-smp-remove-pointless-wmb-s-from-native_stop_other_cpus.patch x86-smp-use-dedicated-cache-line-for-mwait_play_dead.patch x86-smp-cure-kexec-vs.-mwait_play_dead-breakage.patch +cpufreq-amd-pstate-make-amd-pstate-epp-driver-name-hyphenated.patch +can-isotp-isotp_sendmsg-fix-return-error-fix-on-tx-path.patch +maple_tree-fix-potential-out-of-bounds-access-in-mas_wr_end_piv.patch