]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.9
authorSasha Levin <sashal@kernel.org>
Wed, 19 Jun 2024 12:25:03 +0000 (08:25 -0400)
committerSasha Levin <sashal@kernel.org>
Wed, 19 Jun 2024 12:25:03 +0000 (08:25 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.9/dt-bindings-usb-realtek-rts5411-add-missing-addition.patch [new file with mode: 0644]
queue-6.9/i2c-at91-fix-the-functionality-flags-of-the-slave-on.patch [new file with mode: 0644]
queue-6.9/i2c-designware-fix-the-functionality-flags-of-the-sl.patch [new file with mode: 0644]
queue-6.9/mei-vsc-fix-wrong-invocation-of-acpi-sid-method.patch [new file with mode: 0644]
queue-6.9/misc-microchip-pci1xxxx-fix-a-memory-leak-in-the-err.patch [new file with mode: 0644]
queue-6.9/serial-8250_dw-don-t-use-struct-dw8250_data-outside-.patch [new file with mode: 0644]
queue-6.9/series
queue-6.9/usb-storage-alauda-check-whether-the-media-is-initia.patch [new file with mode: 0644]
queue-6.9/zap_pid_ns_processes-clear-tif_notify_signal-along-w.patch [new file with mode: 0644]

diff --git a/queue-6.9/dt-bindings-usb-realtek-rts5411-add-missing-addition.patch b/queue-6.9/dt-bindings-usb-realtek-rts5411-add-missing-addition.patch
new file mode 100644 (file)
index 0000000..ee41ca2
--- /dev/null
@@ -0,0 +1,39 @@
+From 6508ba7af7f3b4d85f4bc869179bcbc2ff59c69b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 23 May 2024 14:44:59 -0500
+Subject: dt-bindings: usb: realtek,rts5411: Add missing "additionalProperties"
+ on child nodes
+
+From: Rob Herring (Arm) <robh@kernel.org>
+
+[ Upstream commit e4228cfd092351c2d9b1a3048b2070287291ccbb ]
+
+All nodes need an explicit additionalProperties or unevaluatedProperties
+unless a $ref has one that's false. As that is not the case with
+usb-device.yaml, "additionalProperties" is needed here.
+
+Fixes: c44d9dab31d6 ("dt-bindings: usb: Add downstream facing ports to realtek binding")
+Signed-off-by: "Rob Herring (Arm)" <robh@kernel.org>
+Reviewed-by: Stephen Boyd <swboyd@chromium.org>
+Link: https://lore.kernel.org/r/20240523194500.2958192-1-robh@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/devicetree/bindings/usb/realtek,rts5411.yaml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
+index 0874fc21f66fb..6577a61cc0753 100644
+--- a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
++++ b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
+@@ -65,6 +65,7 @@ patternProperties:
+     description: The hard wired USB devices
+     type: object
+     $ref: /schemas/usb/usb-device.yaml
++    additionalProperties: true
+ required:
+   - peer-hub
+-- 
+2.43.0
+
diff --git a/queue-6.9/i2c-at91-fix-the-functionality-flags-of-the-slave-on.patch b/queue-6.9/i2c-at91-fix-the-functionality-flags-of-the-slave-on.patch
new file mode 100644 (file)
index 0000000..fd73ca5
--- /dev/null
@@ -0,0 +1,44 @@
+From 9bcdc201c56604b307cb3f801c93e6dc6936a5b0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 31 May 2024 11:19:14 +0200
+Subject: i2c: at91: Fix the functionality flags of the slave-only interface
+
+From: Jean Delvare <jdelvare@suse.de>
+
+[ Upstream commit d6d5645e5fc1233a7ba950de4a72981c394a2557 ]
+
+When an I2C adapter acts only as a slave, it should not claim to
+support I2C master capabilities.
+
+Fixes: 9d3ca54b550c ("i2c: at91: added slave mode support")
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Cc: Juergen Fitschen <me@jue.yt>
+Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
+Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
+Cc: Andi Shyti <andi.shyti@kernel.org>
+Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
+Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
+Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-at91-slave.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/drivers/i2c/busses/i2c-at91-slave.c b/drivers/i2c/busses/i2c-at91-slave.c
+index d6eeea5166c04..131a67d9d4a68 100644
+--- a/drivers/i2c/busses/i2c-at91-slave.c
++++ b/drivers/i2c/busses/i2c-at91-slave.c
+@@ -106,8 +106,7 @@ static int at91_unreg_slave(struct i2c_client *slave)
+ static u32 at91_twi_func(struct i2c_adapter *adapter)
+ {
+-      return I2C_FUNC_SLAVE | I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL
+-              | I2C_FUNC_SMBUS_READ_BLOCK_DATA;
++      return I2C_FUNC_SLAVE;
+ }
+ static const struct i2c_algorithm at91_twi_algorithm_slave = {
+-- 
+2.43.0
+
diff --git a/queue-6.9/i2c-designware-fix-the-functionality-flags-of-the-sl.patch b/queue-6.9/i2c-designware-fix-the-functionality-flags-of-the-sl.patch
new file mode 100644 (file)
index 0000000..93ab65a
--- /dev/null
@@ -0,0 +1,46 @@
+From 2694d60f401c7ad77debd770d2c89247e6e27d0a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 31 May 2024 11:17:48 +0200
+Subject: i2c: designware: Fix the functionality flags of the slave-only
+ interface
+
+From: Jean Delvare <jdelvare@suse.de>
+
+[ Upstream commit cbf3fb5b29e99e3689d63a88c3cddbffa1b8de99 ]
+
+When an I2C adapter acts only as a slave, it should not claim to
+support I2C master capabilities.
+
+Fixes: 5b6d721b266a ("i2c: designware: enable SLAVE in platform module")
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Cc: Luis Oliveira <lolivei@synopsys.com>
+Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
+Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
+Cc: Jan Dabros <jsd@semihalf.com>
+Cc: Andi Shyti <andi.shyti@kernel.org>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
+Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
+Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-designware-slave.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
+index 2e079cf20bb5b..78e2c47e3d7da 100644
+--- a/drivers/i2c/busses/i2c-designware-slave.c
++++ b/drivers/i2c/busses/i2c-designware-slave.c
+@@ -220,7 +220,7 @@ static const struct i2c_algorithm i2c_dw_algo = {
+ void i2c_dw_configure_slave(struct dw_i2c_dev *dev)
+ {
+-      dev->functionality = I2C_FUNC_SLAVE | DW_IC_DEFAULT_FUNCTIONALITY;
++      dev->functionality = I2C_FUNC_SLAVE;
+       dev->slave_cfg = DW_IC_CON_RX_FIFO_FULL_HLD_CTRL |
+                        DW_IC_CON_RESTART_EN | DW_IC_CON_STOP_DET_IFADDRESSED;
+-- 
+2.43.0
+
diff --git a/queue-6.9/mei-vsc-fix-wrong-invocation-of-acpi-sid-method.patch b/queue-6.9/mei-vsc-fix-wrong-invocation-of-acpi-sid-method.patch
new file mode 100644 (file)
index 0000000..5ebb209
--- /dev/null
@@ -0,0 +1,52 @@
+From 2d5f68656ba2c8dfbb969dbab15a44b3d087e104 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 3 Jun 2024 22:50:50 +0200
+Subject: mei: vsc: Fix wrong invocation of ACPI SID method
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit af076156ec6d70332f1555754e99d4a3771ec297 ]
+
+When using an initializer for a union only one of the union members
+must be initialized. The initializer for the acpi_object union variable
+passed as argument to the SID ACPI method was initializing both
+the type and the integer members of the union.
+
+Unfortunately rather then complaining about this gcc simply ignores
+the first initializer and only used the second integer.value = 1
+initializer. Leaving type set to 0 which leads to the argument being
+skipped by acpi acpi_ns_evaluate() resulting in:
+
+ACPI Warning: \_SB.PC00.SPI1.SPFD.CVFD.SID: Insufficient arguments -
+Caller passed 0, method requires 1 (20240322/nsarguments-232)
+
+Fix this by initializing only the integer struct part of the union
+and initializing both members of the integer struct.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
+Reviewed-by: Wentong Wu <wentong.wu@intel.com>
+Link: https://lore.kernel.org/r/20240603205050.505389-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/misc/mei/vsc-fw-loader.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/misc/mei/vsc-fw-loader.c b/drivers/misc/mei/vsc-fw-loader.c
+index ffa4ccd96a104..596a9d695dfc1 100644
+--- a/drivers/misc/mei/vsc-fw-loader.c
++++ b/drivers/misc/mei/vsc-fw-loader.c
+@@ -252,7 +252,7 @@ static int vsc_get_sensor_name(struct vsc_fw_loader *fw_loader,
+ {
+       struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER };
+       union acpi_object obj = {
+-              .type = ACPI_TYPE_INTEGER,
++              .integer.type = ACPI_TYPE_INTEGER,
+               .integer.value = 1,
+       };
+       struct acpi_object_list arg_list = {
+-- 
+2.43.0
+
diff --git a/queue-6.9/misc-microchip-pci1xxxx-fix-a-memory-leak-in-the-err.patch b/queue-6.9/misc-microchip-pci1xxxx-fix-a-memory-leak-in-the-err.patch
new file mode 100644 (file)
index 0000000..f8c8efc
--- /dev/null
@@ -0,0 +1,45 @@
+From 3db276fa944545768ef73dbf6e6ed99a15148759 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 23 May 2024 20:14:34 +0800
+Subject: misc: microchip: pci1xxxx: Fix a memory leak in the error handling of
+ gp_aux_bus_probe()
+
+From: Yongzhi Liu <hyperlyzcs@gmail.com>
+
+[ Upstream commit 77427e3d5c353e3dd98c7c0af322f8d9e3131ace ]
+
+There is a memory leak (forget to free allocated buffers) in a
+memory allocation failure path.
+
+Fix it to jump to the correct error handling code.
+
+Fixes: 393fc2f5948f ("misc: microchip: pci1xxxx: load auxiliary bus driver for the PIO function in the multi-function endpoint of pci1xxxx device.")
+Signed-off-by: Yongzhi Liu <hyperlyzcs@gmail.com>
+Reviewed-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
+Link: https://lore.kernel.org/r/20240523121434.21855-4-hyperlyzcs@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
+index de75d89ef53e8..34c9be437432a 100644
+--- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
++++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
+@@ -69,8 +69,10 @@ static int gp_aux_bus_probe(struct pci_dev *pdev, const struct pci_device_id *id
+       aux_bus->aux_device_wrapper[1] = kzalloc(sizeof(*aux_bus->aux_device_wrapper[1]),
+                                                GFP_KERNEL);
+-      if (!aux_bus->aux_device_wrapper[1])
+-              return -ENOMEM;
++      if (!aux_bus->aux_device_wrapper[1]) {
++              retval =  -ENOMEM;
++              goto err_aux_dev_add_0;
++      }
+       retval = ida_alloc(&gp_client_ida, GFP_KERNEL);
+       if (retval < 0)
+-- 
+2.43.0
+
diff --git a/queue-6.9/serial-8250_dw-don-t-use-struct-dw8250_data-outside-.patch b/queue-6.9/serial-8250_dw-don-t-use-struct-dw8250_data-outside-.patch
new file mode 100644 (file)
index 0000000..6dcb5a2
--- /dev/null
@@ -0,0 +1,109 @@
+From 403a25d51bced97098d5af33ef9300083751faea Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 14 May 2024 22:05:53 +0300
+Subject: serial: 8250_dw: Don't use struct dw8250_data outside of 8250_dw
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+[ Upstream commit 87d80bfbd577912462061b1a45c0ed9c7fcb872f ]
+
+The container of the struct dw8250_port_data is private to the actual
+driver. In particular, 8250_lpss and 8250_dw use different data types
+that are assigned to the UART port private_data. Hence, it must not
+be used outside the specific driver.
+
+Currently the only cpr_val is required by the common code, make it
+be available via struct dw8250_port_data.
+
+This fixes the UART breakage on Intel Galileo boards.
+
+Fixes: 593dea000bc1 ("serial: 8250: dw: Allow to use a fallback CPR value if not synthesized")
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Link: https://lore.kernel.org/r/20240514190730.2787071-2-andriy.shevchenko@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/8250/8250_dw.c    | 9 +++++++--
+ drivers/tty/serial/8250/8250_dwlib.c | 3 +--
+ drivers/tty/serial/8250/8250_dwlib.h | 3 ++-
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
+index 1300c92b8702a..94d680e4b5353 100644
+--- a/drivers/tty/serial/8250/8250_dw.c
++++ b/drivers/tty/serial/8250/8250_dw.c
+@@ -55,6 +55,7 @@
+ #define DW_UART_QUIRK_SKIP_SET_RATE   BIT(2)
+ #define DW_UART_QUIRK_IS_DMA_FC               BIT(3)
+ #define DW_UART_QUIRK_APMC0D08                BIT(4)
++#define DW_UART_QUIRK_CPR_VALUE               BIT(5)
+ static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block *nb)
+ {
+@@ -445,6 +446,10 @@ static void dw8250_prepare_rx_dma(struct uart_8250_port *p)
+ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
+ {
+       unsigned int quirks = data->pdata ? data->pdata->quirks : 0;
++      u32 cpr_value = data->pdata ? data->pdata->cpr_value : 0;
++
++      if (quirks & DW_UART_QUIRK_CPR_VALUE)
++              data->data.cpr_value = cpr_value;
+ #ifdef CONFIG_64BIT
+       if (quirks & DW_UART_QUIRK_OCTEON) {
+@@ -727,8 +732,8 @@ static const struct dw8250_platform_data dw8250_armada_38x_data = {
+ static const struct dw8250_platform_data dw8250_renesas_rzn1_data = {
+       .usr_reg = DW_UART_USR,
+-      .cpr_val = 0x00012f32,
+-      .quirks = DW_UART_QUIRK_IS_DMA_FC,
++      .cpr_value = 0x00012f32,
++      .quirks = DW_UART_QUIRK_CPR_VALUE | DW_UART_QUIRK_IS_DMA_FC,
+ };
+ static const struct dw8250_platform_data dw8250_starfive_jh7100_data = {
+diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c
+index 3e33ddf7bc800..5a2520943dfd5 100644
+--- a/drivers/tty/serial/8250/8250_dwlib.c
++++ b/drivers/tty/serial/8250/8250_dwlib.c
+@@ -242,7 +242,6 @@ static const struct serial_rs485 dw8250_rs485_supported = {
+ void dw8250_setup_port(struct uart_port *p)
+ {
+       struct dw8250_port_data *pd = p->private_data;
+-      struct dw8250_data *data = to_dw8250_data(pd);
+       struct uart_8250_port *up = up_to_u8250p(p);
+       u32 reg, old_dlf;
+@@ -278,7 +277,7 @@ void dw8250_setup_port(struct uart_port *p)
+       reg = dw8250_readl_ext(p, DW_UART_CPR);
+       if (!reg) {
+-              reg = data->pdata->cpr_val;
++              reg = pd->cpr_value;
+               dev_dbg(p->dev, "CPR is not available, using 0x%08x instead\n", reg);
+       }
+       if (!reg)
+diff --git a/drivers/tty/serial/8250/8250_dwlib.h b/drivers/tty/serial/8250/8250_dwlib.h
+index f13e91f2cace9..794a9014cdac1 100644
+--- a/drivers/tty/serial/8250/8250_dwlib.h
++++ b/drivers/tty/serial/8250/8250_dwlib.h
+@@ -19,6 +19,7 @@ struct dw8250_port_data {
+       struct uart_8250_dma    dma;
+       /* Hardware configuration */
++      u32                     cpr_value;
+       u8                      dlf_size;
+       /* RS485 variables */
+@@ -27,7 +28,7 @@ struct dw8250_port_data {
+ struct dw8250_platform_data {
+       u8 usr_reg;
+-      u32 cpr_val;
++      u32 cpr_value;
+       unsigned int quirks;
+ };
+-- 
+2.43.0
+
index ad7a19916c67d737a64d86239d689e845251a4a5..65ccdd55792f167aca9c1e8ed8339a8ab6180e26 100644 (file)
@@ -271,3 +271,11 @@ mm-huge_memory-don-t-unpoison-huge_zero_folio.patch
 remoteproc-k3-r5-jump-to-error-handling-labels-in-start-stop-errors.patch
 greybus-fix-use-after-free-bug-in-gb_interface_release-due-to-race-condition.patch
 ima-fix-use-after-free-on-a-dentry-s-dname.name.patch
+serial-8250_dw-don-t-use-struct-dw8250_data-outside-.patch
+dt-bindings-usb-realtek-rts5411-add-missing-addition.patch
+usb-storage-alauda-check-whether-the-media-is-initia.patch
+mei-vsc-fix-wrong-invocation-of-acpi-sid-method.patch
+misc-microchip-pci1xxxx-fix-a-memory-leak-in-the-err.patch
+i2c-at91-fix-the-functionality-flags-of-the-slave-on.patch
+i2c-designware-fix-the-functionality-flags-of-the-sl.patch
+zap_pid_ns_processes-clear-tif_notify_signal-along-w.patch
diff --git a/queue-6.9/usb-storage-alauda-check-whether-the-media-is-initia.patch b/queue-6.9/usb-storage-alauda-check-whether-the-media-is-initia.patch
new file mode 100644 (file)
index 0000000..342538f
--- /dev/null
@@ -0,0 +1,61 @@
+From 46c4bb2d0307d80eeb748165b8cd052daa394765 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 26 May 2024 09:27:45 +0800
+Subject: usb-storage: alauda: Check whether the media is initialized
+
+From: Shichao Lai <shichaorai@gmail.com>
+
+[ Upstream commit 16637fea001ab3c8df528a8995b3211906165a30 ]
+
+The member "uzonesize" of struct alauda_info will remain 0
+if alauda_init_media() fails, potentially causing divide errors
+in alauda_read_data() and alauda_write_lba().
+- Add a member "media_initialized" to struct alauda_info.
+- Change a condition in alauda_check_media() to ensure the
+  first initialization.
+- Add an error check for the return value of alauda_init_media().
+
+Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support")
+Reported-by: xingwei lee <xrivendell7@gmail.com>
+Reported-by: yue sun <samsun1006219@gmail.com>
+Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Shichao Lai <shichaorai@gmail.com>
+Link: https://lore.kernel.org/r/20240526012745.2852061-1-shichaorai@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/usb/storage/alauda.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
+index 115f05a6201a1..40d34cc28344a 100644
+--- a/drivers/usb/storage/alauda.c
++++ b/drivers/usb/storage/alauda.c
+@@ -105,6 +105,8 @@ struct alauda_info {
+       unsigned char sense_key;
+       unsigned long sense_asc;        /* additional sense code */
+       unsigned long sense_ascq;       /* additional sense code qualifier */
++
++      bool media_initialized;
+ };
+ #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
+@@ -476,11 +478,12 @@ static int alauda_check_media(struct us_data *us)
+       }
+       /* Check for media change */
+-      if (status[0] & 0x08) {
++      if (status[0] & 0x08 || !info->media_initialized) {
+               usb_stor_dbg(us, "Media change detected\n");
+               alauda_free_maps(&MEDIA_INFO(us));
+-              alauda_init_media(us);
+-
++              rc = alauda_init_media(us);
++              if (rc == USB_STOR_TRANSPORT_GOOD)
++                      info->media_initialized = true;
+               info->sense_key = UNIT_ATTENTION;
+               info->sense_asc = 0x28;
+               info->sense_ascq = 0x00;
+-- 
+2.43.0
+
diff --git a/queue-6.9/zap_pid_ns_processes-clear-tif_notify_signal-along-w.patch b/queue-6.9/zap_pid_ns_processes-clear-tif_notify_signal-along-w.patch
new file mode 100644 (file)
index 0000000..a8f7b64
--- /dev/null
@@ -0,0 +1,61 @@
+From 5fe15bf52cddfca7652cc589b3e50ffc2339a429 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 8 Jun 2024 14:06:16 +0200
+Subject: zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with
+ TIF_SIGPENDING
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+[ Upstream commit 7fea700e04bd3f424c2d836e98425782f97b494e ]
+
+kernel_wait4() doesn't sleep and returns -EINTR if there is no
+eligible child and signal_pending() is true.
+
+That is why zap_pid_ns_processes() clears TIF_SIGPENDING but this is not
+enough, it should also clear TIF_NOTIFY_SIGNAL to make signal_pending()
+return false and avoid a busy-wait loop.
+
+Link: https://lkml.kernel.org/r/20240608120616.GB7947@redhat.com
+Fixes: 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL")
+Signed-off-by: Oleg Nesterov <oleg@redhat.com>
+Reported-by: Rachel Menge <rachelmenge@linux.microsoft.com>
+Closes: https://lore.kernel.org/all/1386cd49-36d0-4a5c-85e9-bc42056a5a38@linux.microsoft.com/
+Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
+Tested-by: Wei Fu <fuweid89@gmail.com>
+Reviewed-by: Jens Axboe <axboe@kernel.dk>
+Cc: Allen Pais <apais@linux.microsoft.com>
+Cc: Christian Brauner <brauner@kernel.org>
+Cc: Frederic Weisbecker <frederic@kernel.org>
+Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
+Cc: Joel Granados <j.granados@samsung.com>
+Cc: Josh Triplett <josh@joshtriplett.org>
+Cc: Lai Jiangshan <jiangshanlai@gmail.com>
+Cc: Mateusz Guzik <mjguzik@gmail.com>
+Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Cc: Mike Christie <michael.christie@oracle.com>
+Cc: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
+Cc: Paul E. McKenney <paulmck@kernel.org>
+Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
+Cc: Zqiang <qiang.zhang1211@gmail.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/pid_namespace.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
+index 7ade20e952321..415201ca0c7e4 100644
+--- a/kernel/pid_namespace.c
++++ b/kernel/pid_namespace.c
+@@ -218,6 +218,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
+        */
+       do {
+               clear_thread_flag(TIF_SIGPENDING);
++              clear_thread_flag(TIF_NOTIFY_SIGNAL);
+               rc = kernel_wait4(-1, NULL, __WALL, NULL);
+       } while (rc != -ECHILD);
+-- 
+2.43.0
+