From: Greg Kroah-Hartman Date: Sun, 29 Oct 2023 12:25:32 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v6.1.61~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34732fe3a3c404e999aa12ad0f89803cfc7da93a;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: clk-sanitize-possible_parent_show-to-handle-return-value-of-of_clk_get_parent_name.patch i2c-aspeed-fix-i2c-bus-hang-in-slave-read.patch i2c-muxes-i2c-demux-pinctrl-use-of_get_i2c_adapter_by_node.patch i2c-muxes-i2c-mux-gpmux-use-of_get_i2c_adapter_by_node.patch i2c-muxes-i2c-mux-pinctrl-use-of_get_i2c_adapter_by_node.patch i2c-stm32f7-fix-pec-handling-in-case-of-smbus-transfers.patch iio-exynos-adc-request-second-interupt-only-when-touchscreen-mode-is-used.patch misc-fastrpc-clean-buffers-on-remote-invocation-failures.patch nvmem-imx-correct-nregs-for-i.mx6sll.patch nvmem-imx-correct-nregs-for-i.mx6ul.patch nvmem-imx-correct-nregs-for-i.mx6ull.patch perf-core-fix-potential-null-deref.patch sparc32-fix-a-braino-in-fault-handling-in-csum_and_copy_..._user.patch tracing-kprobes-fix-the-description-of-variable-length-arguments.patch --- diff --git a/queue-5.10/clk-sanitize-possible_parent_show-to-handle-return-value-of-of_clk_get_parent_name.patch b/queue-5.10/clk-sanitize-possible_parent_show-to-handle-return-value-of-of_clk_get_parent_name.patch new file mode 100644 index 00000000000..47c5dfad2ba --- /dev/null +++ b/queue-5.10/clk-sanitize-possible_parent_show-to-handle-return-value-of-of_clk_get_parent_name.patch @@ -0,0 +1,73 @@ +From ceb87a361d0b079ecbc7d2831618c19087f304a9 Mon Sep 17 00:00:00 2001 +From: Alessandro Carminati +Date: Thu, 21 Sep 2023 07:32:17 +0000 +Subject: clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name + +From: Alessandro Carminati + +commit ceb87a361d0b079ecbc7d2831618c19087f304a9 upstream. + +In the possible_parent_show function, ensure proper handling of the return +value from of_clk_get_parent_name to prevent potential issues arising from +a NULL return. +The current implementation invokes seq_puts directly on the result of +of_clk_get_parent_name without verifying the return value, which can lead +to kernel panic if the function returns NULL. + +This patch addresses the concern by introducing a check on the return +value of of_clk_get_parent_name. If the return value is not NULL, the +function proceeds to call seq_puts, providing the returned value as +argument. +However, if of_clk_get_parent_name returns NULL, the function provides a +static string as argument, avoiding the panic. + +Fixes: 1ccc0ddf046a ("clk: Use seq_puts() in possible_parent_show()") +Reported-by: Philip Daly +Signed-off-by: Alessandro Carminati (Red Hat) +Link: https://lore.kernel.org/r/20230921073217.572151-1-alessandro.carminati@gmail.com +Signed-off-by: Stephen Boyd +Signed-off-by: Greg Kroah-Hartman +--- + drivers/clk/clk.c | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +--- a/drivers/clk/clk.c ++++ b/drivers/clk/clk.c +@@ -3167,6 +3167,7 @@ static void possible_parent_show(struct + unsigned int i, char terminator) + { + struct clk_core *parent; ++ const char *name = NULL; + + /* + * Go through the following options to fetch a parent's name. +@@ -3181,18 +3182,20 @@ static void possible_parent_show(struct + * registered (yet). + */ + parent = clk_core_get_parent_by_index(core, i); +- if (parent) ++ if (parent) { + seq_puts(s, parent->name); +- else if (core->parents[i].name) ++ } else if (core->parents[i].name) { + seq_puts(s, core->parents[i].name); +- else if (core->parents[i].fw_name) ++ } else if (core->parents[i].fw_name) { + seq_printf(s, "<%s>(fw)", core->parents[i].fw_name); +- else if (core->parents[i].index >= 0) +- seq_puts(s, +- of_clk_get_parent_name(core->of_node, +- core->parents[i].index)); +- else +- seq_puts(s, "(missing)"); ++ } else { ++ if (core->parents[i].index >= 0) ++ name = of_clk_get_parent_name(core->of_node, core->parents[i].index); ++ if (!name) ++ name = "(missing)"; ++ ++ seq_puts(s, name); ++ } + + seq_putc(s, terminator); + } diff --git a/queue-5.10/i2c-aspeed-fix-i2c-bus-hang-in-slave-read.patch b/queue-5.10/i2c-aspeed-fix-i2c-bus-hang-in-slave-read.patch new file mode 100644 index 00000000000..1e867bef458 --- /dev/null +++ b/queue-5.10/i2c-aspeed-fix-i2c-bus-hang-in-slave-read.patch @@ -0,0 +1,49 @@ +From 54f1840ddee9bbdc8dd89fbbfdfa632401244146 Mon Sep 17 00:00:00 2001 +From: Jian Zhang +Date: Fri, 6 Oct 2023 10:22:33 +0800 +Subject: i2c: aspeed: Fix i2c bus hang in slave read + +From: Jian Zhang + +commit 54f1840ddee9bbdc8dd89fbbfdfa632401244146 upstream. + +When the `CONFIG_I2C_SLAVE` option is enabled and the device operates +as a slave, a situation arises where the master sends a START signal +without the accompanying STOP signal. This action results in a +persistent I2C bus timeout. The core issue stems from the fact that +the i2c controller remains in a slave read state without a timeout +mechanism. As a consequence, the bus perpetually experiences timeouts. + +In this case, the i2c bus will be reset, but the slave_state reset is +missing. + +Fixes: fee465150b45 ("i2c: aspeed: Reset the i2c controller when timeout occurs") +Signed-off-by: Jian Zhang +Acked-by: Andi Shyti +Tested-by: Andrew Jeffery +Reviewed-by: Andrew Jeffery +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-aspeed.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-aspeed.c ++++ b/drivers/i2c/busses/i2c-aspeed.c +@@ -740,6 +740,8 @@ static void __aspeed_i2c_reg_slave(struc + func_ctrl_reg_val = readl(bus->base + ASPEED_I2C_FUN_CTRL_REG); + func_ctrl_reg_val |= ASPEED_I2CD_SLAVE_EN; + writel(func_ctrl_reg_val, bus->base + ASPEED_I2C_FUN_CTRL_REG); ++ ++ bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE; + } + + static int aspeed_i2c_reg_slave(struct i2c_client *client) +@@ -756,7 +758,6 @@ static int aspeed_i2c_reg_slave(struct i + __aspeed_i2c_reg_slave(bus, client->addr); + + bus->slave = client; +- bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE; + spin_unlock_irqrestore(&bus->lock, flags); + + return 0; diff --git a/queue-5.10/i2c-muxes-i2c-demux-pinctrl-use-of_get_i2c_adapter_by_node.patch b/queue-5.10/i2c-muxes-i2c-demux-pinctrl-use-of_get_i2c_adapter_by_node.patch new file mode 100644 index 00000000000..20d84ed56e9 --- /dev/null +++ b/queue-5.10/i2c-muxes-i2c-demux-pinctrl-use-of_get_i2c_adapter_by_node.patch @@ -0,0 +1,42 @@ +From 0fb118de5003028ad092a4e66fc6d07b86c3bc94 Mon Sep 17 00:00:00 2001 +From: Herve Codina +Date: Fri, 20 Oct 2023 17:30:12 +0200 +Subject: i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() + +From: Herve Codina + +commit 0fb118de5003028ad092a4e66fc6d07b86c3bc94 upstream. + +i2c-demux-pinctrl uses the pair of_find_i2c_adapter_by_node() / +i2c_put_adapter(). These pair alone is not correct to properly lock the +I2C parent adapter. + +Indeed, i2c_put_adapter() decrements the module refcount while +of_find_i2c_adapter_by_node() does not increment it. This leads to an +underflow of the parent module refcount. + +Use the dedicated function, of_get_i2c_adapter_by_node(), to handle +correctly the module refcount. + +Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver") +Signed-off-by: Herve Codina +Cc: stable@vger.kernel.org +Acked-by: Peter Rosin +Reviewed-by: Jonathan Cameron +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/muxes/i2c-demux-pinctrl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c ++++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c +@@ -61,7 +61,7 @@ static int i2c_demux_activate_master(str + if (ret) + goto err; + +- adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np); ++ adap = of_get_i2c_adapter_by_node(priv->chan[new_chan].parent_np); + if (!adap) { + ret = -ENODEV; + goto err_with_revert; diff --git a/queue-5.10/i2c-muxes-i2c-mux-gpmux-use-of_get_i2c_adapter_by_node.patch b/queue-5.10/i2c-muxes-i2c-mux-gpmux-use-of_get_i2c_adapter_by_node.patch new file mode 100644 index 00000000000..0f65bc4204b --- /dev/null +++ b/queue-5.10/i2c-muxes-i2c-mux-gpmux-use-of_get_i2c_adapter_by_node.patch @@ -0,0 +1,42 @@ +From 3dc0ec46f6e7511fc4fdf6b6cda439382bc957f1 Mon Sep 17 00:00:00 2001 +From: Herve Codina +Date: Fri, 20 Oct 2023 17:30:13 +0200 +Subject: i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node() + +From: Herve Codina + +commit 3dc0ec46f6e7511fc4fdf6b6cda439382bc957f1 upstream. + +i2c-mux-gpmux uses the pair of_find_i2c_adapter_by_node() / +i2c_put_adapter(). These pair alone is not correct to properly lock the +I2C parent adapter. + +Indeed, i2c_put_adapter() decrements the module refcount while +of_find_i2c_adapter_by_node() does not increment it. This leads to an +underflow of the parent module refcount. + +Use the dedicated function, of_get_i2c_adapter_by_node(), to handle +correctly the module refcount. + +Fixes: ac8498f0ce53 ("i2c: i2c-mux-gpmux: new driver") +Signed-off-by: Herve Codina +Cc: stable@vger.kernel.org +Acked-by: Peter Rosin +Reviewed-by: Jonathan Cameron +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/muxes/i2c-mux-gpmux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/i2c/muxes/i2c-mux-gpmux.c ++++ b/drivers/i2c/muxes/i2c-mux-gpmux.c +@@ -52,7 +52,7 @@ static struct i2c_adapter *mux_parent_ad + dev_err(dev, "Cannot parse i2c-parent\n"); + return ERR_PTR(-ENODEV); + } +- parent = of_find_i2c_adapter_by_node(parent_np); ++ parent = of_get_i2c_adapter_by_node(parent_np); + of_node_put(parent_np); + if (!parent) + return ERR_PTR(-EPROBE_DEFER); diff --git a/queue-5.10/i2c-muxes-i2c-mux-pinctrl-use-of_get_i2c_adapter_by_node.patch b/queue-5.10/i2c-muxes-i2c-mux-pinctrl-use-of_get_i2c_adapter_by_node.patch new file mode 100644 index 00000000000..1be0f124dbb --- /dev/null +++ b/queue-5.10/i2c-muxes-i2c-mux-pinctrl-use-of_get_i2c_adapter_by_node.patch @@ -0,0 +1,42 @@ +From 3171d37b58a76e1febbf3f4af2d06234a98cf88b Mon Sep 17 00:00:00 2001 +From: Herve Codina +Date: Fri, 20 Oct 2023 17:30:11 +0200 +Subject: i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node() + +From: Herve Codina + +commit 3171d37b58a76e1febbf3f4af2d06234a98cf88b upstream. + +i2c-mux-pinctrl uses the pair of_find_i2c_adapter_by_node() / +i2c_put_adapter(). These pair alone is not correct to properly lock the +I2C parent adapter. + +Indeed, i2c_put_adapter() decrements the module refcount while +of_find_i2c_adapter_by_node() does not increment it. This leads to an +underflow of the parent module refcount. + +Use the dedicated function, of_get_i2c_adapter_by_node(), to handle +correctly the module refcount. + +Fixes: c4aee3e1b0de ("i2c: mux: pinctrl: remove platform_data") +Signed-off-by: Herve Codina +Cc: stable@vger.kernel.org +Acked-by: Peter Rosin +Reviewed-by: Jonathan Cameron +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/muxes/i2c-mux-pinctrl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/i2c/muxes/i2c-mux-pinctrl.c ++++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c +@@ -62,7 +62,7 @@ static struct i2c_adapter *i2c_mux_pinct + dev_err(dev, "Cannot parse i2c-parent\n"); + return ERR_PTR(-ENODEV); + } +- parent = of_find_i2c_adapter_by_node(parent_np); ++ parent = of_get_i2c_adapter_by_node(parent_np); + of_node_put(parent_np); + if (!parent) + return ERR_PTR(-EPROBE_DEFER); diff --git a/queue-5.10/i2c-stm32f7-fix-pec-handling-in-case-of-smbus-transfers.patch b/queue-5.10/i2c-stm32f7-fix-pec-handling-in-case-of-smbus-transfers.patch new file mode 100644 index 00000000000..bb22bd15ae8 --- /dev/null +++ b/queue-5.10/i2c-stm32f7-fix-pec-handling-in-case-of-smbus-transfers.patch @@ -0,0 +1,64 @@ +From c896ff2dd8f30a6b0a922c83a96f6d43f05f0e92 Mon Sep 17 00:00:00 2001 +From: Alain Volmat +Date: Tue, 10 Oct 2023 10:44:54 +0200 +Subject: i2c: stm32f7: Fix PEC handling in case of SMBUS transfers + +From: Alain Volmat + +commit c896ff2dd8f30a6b0a922c83a96f6d43f05f0e92 upstream. + +In case of SMBUS byte read with PEC enabled, the whole transfer +is split into two commands. A first write command, followed by +a read command. The write command does not have any PEC byte +and a PEC byte is appended at the end of the read command. +(cf Read byte protocol with PEC in SMBUS specification) + +Within the STM32 I2C controller, handling (either sending +or receiving) of the PEC byte is done via the PECBYTE bit in +register CR2. + +Currently, the PECBYTE is set at the beginning of a transfer, +which lead to sending a PEC byte at the end of the write command +(hence losing the real last byte), and also does not check the +PEC byte received during the read command. + +This patch corrects the function stm32f7_i2c_smbus_xfer_msg +in order to only set the PECBYTE during the read command. + +Fixes: 9e48155f6bfe ("i2c: i2c-stm32f7: Add initial SMBus protocols support") +Signed-off-by: Alain Volmat +Reviewed-by: Pierre-Yves MORDRET +Acked-by: Andi Shyti +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-stm32f7.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/i2c/busses/i2c-stm32f7.c ++++ b/drivers/i2c/busses/i2c-stm32f7.c +@@ -1042,9 +1042,10 @@ static int stm32f7_i2c_smbus_xfer_msg(st + /* Configure PEC */ + if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) { + cr1 |= STM32F7_I2C_CR1_PECEN; +- cr2 |= STM32F7_I2C_CR2_PECBYTE; +- if (!f7_msg->read_write) ++ if (!f7_msg->read_write) { ++ cr2 |= STM32F7_I2C_CR2_PECBYTE; + f7_msg->count++; ++ } + } else { + cr1 &= ~STM32F7_I2C_CR1_PECEN; + cr2 &= ~STM32F7_I2C_CR2_PECBYTE; +@@ -1132,8 +1133,10 @@ static void stm32f7_i2c_smbus_rep_start( + f7_msg->stop = true; + + /* Add one byte for PEC if needed */ +- if (cr1 & STM32F7_I2C_CR1_PECEN) ++ if (cr1 & STM32F7_I2C_CR1_PECEN) { ++ cr2 |= STM32F7_I2C_CR2_PECBYTE; + f7_msg->count++; ++ } + + /* Set number of bytes to be transferred */ + cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK); diff --git a/queue-5.10/iio-exynos-adc-request-second-interupt-only-when-touchscreen-mode-is-used.patch b/queue-5.10/iio-exynos-adc-request-second-interupt-only-when-touchscreen-mode-is-used.patch new file mode 100644 index 00000000000..d3172875a9d --- /dev/null +++ b/queue-5.10/iio-exynos-adc-request-second-interupt-only-when-touchscreen-mode-is-used.patch @@ -0,0 +1,72 @@ +From 865b080e3229102f160889328ce2e8e97aa65ea0 Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Mon, 9 Oct 2023 12:14:12 +0200 +Subject: iio: exynos-adc: request second interupt only when touchscreen mode is used + +From: Marek Szyprowski + +commit 865b080e3229102f160889328ce2e8e97aa65ea0 upstream. + +Second interrupt is needed only when touchscreen mode is used, so don't +request it unconditionally. This removes the following annoying warning +during boot: + +exynos-adc 14d10000.adc: error -ENXIO: IRQ index 1 not found + +Fixes: 2bb8ad9b44c5 ("iio: exynos-adc: add experimental touchscreen support") +Signed-off-by: Marek Szyprowski +Link: https://lore.kernel.org/r/20231009101412.916922-1-m.szyprowski@samsung.com +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/adc/exynos_adc.c | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) + +--- a/drivers/iio/adc/exynos_adc.c ++++ b/drivers/iio/adc/exynos_adc.c +@@ -821,16 +821,26 @@ static int exynos_adc_probe(struct platf + } + } + ++ /* leave out any TS related code if unreachable */ ++ if (IS_REACHABLE(CONFIG_INPUT)) { ++ has_ts = of_property_read_bool(pdev->dev.of_node, ++ "has-touchscreen") || pdata; ++ } ++ + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + info->irq = irq; + +- irq = platform_get_irq(pdev, 1); +- if (irq == -EPROBE_DEFER) +- return irq; +- +- info->tsirq = irq; ++ if (has_ts) { ++ irq = platform_get_irq(pdev, 1); ++ if (irq == -EPROBE_DEFER) ++ return irq; ++ ++ info->tsirq = irq; ++ } else { ++ info->tsirq = -1; ++ } + + info->dev = &pdev->dev; + +@@ -895,12 +905,6 @@ static int exynos_adc_probe(struct platf + if (info->data->init_hw) + info->data->init_hw(info); + +- /* leave out any TS related code if unreachable */ +- if (IS_REACHABLE(CONFIG_INPUT)) { +- has_ts = of_property_read_bool(pdev->dev.of_node, +- "has-touchscreen") || pdata; +- } +- + if (pdata) + info->delay = pdata->delay; + else diff --git a/queue-5.10/misc-fastrpc-clean-buffers-on-remote-invocation-failures.patch b/queue-5.10/misc-fastrpc-clean-buffers-on-remote-invocation-failures.patch new file mode 100644 index 00000000000..e60e1f1ee99 --- /dev/null +++ b/queue-5.10/misc-fastrpc-clean-buffers-on-remote-invocation-failures.patch @@ -0,0 +1,51 @@ +From 1c8093591d1e372d700fe65423e7315a8ecf721b Mon Sep 17 00:00:00 2001 +From: Ekansh Gupta +Date: Fri, 13 Oct 2023 13:20:06 +0100 +Subject: misc: fastrpc: Clean buffers on remote invocation failures + +From: Ekansh Gupta + +commit 1c8093591d1e372d700fe65423e7315a8ecf721b upstream. + +With current design, buffers and dma handles are not freed in case +of remote invocation failures returned from DSP. This could result +in buffer leakings and dma handle pointing to wrong memory in the +fastrpc kernel. Adding changes to clean buffers and dma handles +even when remote invocation to DSP returns failures. + +Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method") +Cc: stable +Signed-off-by: Ekansh Gupta +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20231013122007.174464-4-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/misc/fastrpc.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/misc/fastrpc.c ++++ b/drivers/misc/fastrpc.c +@@ -993,11 +993,6 @@ static int fastrpc_internal_invoke(struc + if (err) + goto bail; + +- /* Check the response from remote dsp */ +- err = ctx->retval; +- if (err) +- goto bail; +- + if (ctx->nscalars) { + /* make sure that all memory writes by DSP are seen by CPU */ + dma_rmb(); +@@ -1007,6 +1002,11 @@ static int fastrpc_internal_invoke(struc + goto bail; + } + ++ /* Check the response from remote dsp */ ++ err = ctx->retval; ++ if (err) ++ goto bail; ++ + bail: + if (err != -ERESTARTSYS && err != -ETIMEDOUT) { + /* We are done with this compute context */ diff --git a/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6sll.patch b/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6sll.patch new file mode 100644 index 00000000000..66395c1e53d --- /dev/null +++ b/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6sll.patch @@ -0,0 +1,32 @@ +From 414a98abbefd82d591f4e2d1efd2917bcd3b6f6d Mon Sep 17 00:00:00 2001 +From: Peng Fan +Date: Fri, 13 Oct 2023 13:49:02 +0100 +Subject: nvmem: imx: correct nregs for i.MX6SLL + +From: Peng Fan + +commit 414a98abbefd82d591f4e2d1efd2917bcd3b6f6d upstream. + +The nregs for i.MX6SLL should be 80 per fuse map, correct it. + +Fixes: 6da27821a6f5 ("nvmem: imx-ocotp: add support for imx6sll") +Cc: Stable@vger.kernel.org +Signed-off-by: Peng Fan +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20231013124904.175782-2-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvmem/imx-ocotp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/imx-ocotp.c ++++ b/drivers/nvmem/imx-ocotp.c +@@ -467,7 +467,7 @@ static const struct ocotp_params imx6sl_ + }; + + static const struct ocotp_params imx6sll_params = { +- .nregs = 128, ++ .nregs = 80, + .bank_address_words = 0, + .set_timing = imx_ocotp_set_imx6_timing, + .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT, diff --git a/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6ul.patch b/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6ul.patch new file mode 100644 index 00000000000..fa9658a0a87 --- /dev/null +++ b/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6ul.patch @@ -0,0 +1,32 @@ +From 7d6e10f5d254681983b53d979422c8de3fadbefb Mon Sep 17 00:00:00 2001 +From: Peng Fan +Date: Fri, 13 Oct 2023 13:49:03 +0100 +Subject: nvmem: imx: correct nregs for i.MX6UL + +From: Peng Fan + +commit 7d6e10f5d254681983b53d979422c8de3fadbefb upstream. + +The nregs for i.MX6UL should be 144 per fuse map, correct it. + +Fixes: 4aa2b4802046 ("nvmem: octop: Add support for imx6ul") +Cc: Stable@vger.kernel.org +Signed-off-by: Peng Fan +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20231013124904.175782-3-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvmem/imx-ocotp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/imx-ocotp.c ++++ b/drivers/nvmem/imx-ocotp.c +@@ -481,7 +481,7 @@ static const struct ocotp_params imx6sx_ + }; + + static const struct ocotp_params imx6ul_params = { +- .nregs = 128, ++ .nregs = 144, + .bank_address_words = 0, + .set_timing = imx_ocotp_set_imx6_timing, + .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT, diff --git a/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6ull.patch b/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6ull.patch new file mode 100644 index 00000000000..7e435921678 --- /dev/null +++ b/queue-5.10/nvmem-imx-correct-nregs-for-i.mx6ull.patch @@ -0,0 +1,32 @@ +From 2382c1b044231fd49eaf9aa82bc7113fc55487b8 Mon Sep 17 00:00:00 2001 +From: Peng Fan +Date: Fri, 13 Oct 2023 13:49:04 +0100 +Subject: nvmem: imx: correct nregs for i.MX6ULL + +From: Peng Fan + +commit 2382c1b044231fd49eaf9aa82bc7113fc55487b8 upstream. + +The nregs for i.MX6ULL should be 80 per fuse map, correct it. + +Fixes: ffbc34bf0e9c ("nvmem: imx-ocotp: Implement i.MX6ULL/ULZ support") +Cc: Stable@vger.kernel.org +Signed-off-by: Peng Fan +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20231013124904.175782-4-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvmem/imx-ocotp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/imx-ocotp.c ++++ b/drivers/nvmem/imx-ocotp.c +@@ -488,7 +488,7 @@ static const struct ocotp_params imx6ul_ + }; + + static const struct ocotp_params imx6ull_params = { +- .nregs = 64, ++ .nregs = 80, + .bank_address_words = 0, + .set_timing = imx_ocotp_set_imx6_timing, + .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT, diff --git a/queue-5.10/perf-core-fix-potential-null-deref.patch b/queue-5.10/perf-core-fix-potential-null-deref.patch new file mode 100644 index 00000000000..1378aaf2b74 --- /dev/null +++ b/queue-5.10/perf-core-fix-potential-null-deref.patch @@ -0,0 +1,32 @@ +From a71ef31485bb51b846e8db8b3a35e432cc15afb5 Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Tue, 24 Oct 2023 11:42:21 +0200 +Subject: perf/core: Fix potential NULL deref + +From: Peter Zijlstra + +commit a71ef31485bb51b846e8db8b3a35e432cc15afb5 upstream. + +Smatch is awesome. + +Fixes: 32671e3799ca ("perf: Disallow mis-matched inherited group reads") +Reported-by: Dan Carpenter +Signed-off-by: Peter Zijlstra (Intel) +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman +--- + kernel/events/core.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/events/core.c ++++ b/kernel/events/core.c +@@ -12846,7 +12846,8 @@ static int inherit_group(struct perf_eve + !perf_get_aux_event(child_ctr, leader)) + return -EINVAL; + } +- leader->group_generation = parent_event->group_generation; ++ if (leader) ++ leader->group_generation = parent_event->group_generation; + return 0; + } + diff --git a/queue-5.10/series b/queue-5.10/series index 41f1edc4a0b..d3bd087cbfc 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -25,3 +25,17 @@ gtp-uapi-fix-gtpa_max.patch gtp-fix-fragmentation-needed-check-with-gso.patch i40e-fix-wrong-check-for-i40e_txr_flags_wb_on_itr.patch kasan-print-the-original-fault-addr-when-access-invalid-shadow.patch +iio-exynos-adc-request-second-interupt-only-when-touchscreen-mode-is-used.patch +i2c-muxes-i2c-mux-pinctrl-use-of_get_i2c_adapter_by_node.patch +i2c-muxes-i2c-mux-gpmux-use-of_get_i2c_adapter_by_node.patch +i2c-muxes-i2c-demux-pinctrl-use-of_get_i2c_adapter_by_node.patch +i2c-stm32f7-fix-pec-handling-in-case-of-smbus-transfers.patch +i2c-aspeed-fix-i2c-bus-hang-in-slave-read.patch +tracing-kprobes-fix-the-description-of-variable-length-arguments.patch +misc-fastrpc-clean-buffers-on-remote-invocation-failures.patch +nvmem-imx-correct-nregs-for-i.mx6ull.patch +nvmem-imx-correct-nregs-for-i.mx6sll.patch +nvmem-imx-correct-nregs-for-i.mx6ul.patch +perf-core-fix-potential-null-deref.patch +sparc32-fix-a-braino-in-fault-handling-in-csum_and_copy_..._user.patch +clk-sanitize-possible_parent_show-to-handle-return-value-of-of_clk_get_parent_name.patch diff --git a/queue-5.10/sparc32-fix-a-braino-in-fault-handling-in-csum_and_copy_..._user.patch b/queue-5.10/sparc32-fix-a-braino-in-fault-handling-in-csum_and_copy_..._user.patch new file mode 100644 index 00000000000..23ae7f84439 --- /dev/null +++ b/queue-5.10/sparc32-fix-a-braino-in-fault-handling-in-csum_and_copy_..._user.patch @@ -0,0 +1,45 @@ +From 1f36cd05e0081f2c75769a551d584c4ffb2a5660 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Sun, 22 Oct 2023 19:34:28 -0400 +Subject: sparc32: fix a braino in fault handling in csum_and_copy_..._user() + +From: Al Viro + +commit 1f36cd05e0081f2c75769a551d584c4ffb2a5660 upstream. + +Fault handler used to make non-trivial calls, so it needed +to set a stack frame up. Used to be + save ... - grab a stack frame, old %o... become %i... + .... + ret - go back to address originally in %o7, currently %i7 + restore - switch to previous stack frame, in delay slot +Non-trivial calls had been gone since ab5e8b331244 and that code should +have become + retl - go back to address in %o7 + clr %o0 - have return value set to 0 +What it had become instead was + ret - go back to address in %i7 - return address of *caller* + clr %o0 - have return value set to 0 +which is not good, to put it mildly - we forcibly return 0 from +csum_and_copy_{from,to}_iter() (which is what the call of that +thing had been inlined into) and do that without dropping the +stack frame of said csum_and_copy_..._iter(). Confuses the +hell out of the caller of csum_and_copy_..._iter(), obviously... + +Reviewed-by: Sam Ravnborg +Fixes: ab5e8b331244 "sparc32: propagate the calling conventions change down to __csum_partial_copy_sparc_generic()" +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman +--- + arch/sparc/lib/checksum_32.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/sparc/lib/checksum_32.S ++++ b/arch/sparc/lib/checksum_32.S +@@ -463,5 +463,5 @@ ccslow: cmp %g1, 0 + * we only bother with faults on loads... */ + + cc_fault: +- ret ++ retl + clr %o0 diff --git a/queue-5.10/tracing-kprobes-fix-the-description-of-variable-length-arguments.patch b/queue-5.10/tracing-kprobes-fix-the-description-of-variable-length-arguments.patch new file mode 100644 index 00000000000..f9d617ea8d8 --- /dev/null +++ b/queue-5.10/tracing-kprobes-fix-the-description-of-variable-length-arguments.patch @@ -0,0 +1,51 @@ +From e0f831836cead677fb07d54bd6bf499df35640c2 Mon Sep 17 00:00:00 2001 +From: Yujie Liu +Date: Fri, 27 Oct 2023 12:13:14 +0800 +Subject: tracing/kprobes: Fix the description of variable length arguments + +From: Yujie Liu + +commit e0f831836cead677fb07d54bd6bf499df35640c2 upstream. + +Fix the following kernel-doc warnings: + +kernel/trace/trace_kprobe.c:1029: warning: Excess function parameter 'args' description in '__kprobe_event_gen_cmd_start' +kernel/trace/trace_kprobe.c:1097: warning: Excess function parameter 'args' description in '__kprobe_event_add_fields' + +Refer to the usage of variable length arguments elsewhere in the kernel +code, "@..." is the proper way to express it in the description. + +Link: https://lore.kernel.org/all/20231027041315.2613166-1-yujie.liu@intel.com/ + +Fixes: 2a588dd1d5d6 ("tracing: Add kprobe event command generation functions") +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202310190437.paI6LYJF-lkp@intel.com/ +Signed-off-by: Yujie Liu +Reviewed-by: Mukesh Ojha +Acked-by: Masami Hiramatsu (Google) +Signed-off-by: Masami Hiramatsu (Google) +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace_kprobe.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/trace/trace_kprobe.c ++++ b/kernel/trace/trace_kprobe.c +@@ -952,7 +952,7 @@ EXPORT_SYMBOL_GPL(kprobe_event_cmd_init) + * @name: The name of the kprobe event + * @loc: The location of the kprobe event + * @kretprobe: Is this a return probe? +- * @args: Variable number of arg (pairs), one pair for each field ++ * @...: Variable number of arg (pairs), one pair for each field + * + * NOTE: Users normally won't want to call this function directly, but + * rather use the kprobe_event_gen_cmd_start() wrapper, which automatically +@@ -1025,7 +1025,7 @@ EXPORT_SYMBOL_GPL(__kprobe_event_gen_cmd + /** + * __kprobe_event_add_fields - Add probe fields to a kprobe command from arg list + * @cmd: A pointer to the dynevent_cmd struct representing the new event +- * @args: Variable number of arg (pairs), one pair for each field ++ * @...: Variable number of arg (pairs), one pair for each field + * + * NOTE: Users normally won't want to call this function directly, but + * rather use the kprobe_event_add_fields() wrapper, which