From: Greg Kroah-Hartman Date: Mon, 4 May 2026 12:38:34 +0000 (+0200) Subject: 6.18-stable patches X-Git-Tag: v6.12.86~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd0258c83e329200fcf8d28c9fe032b51276228f;p=thirdparty%2Fkernel%2Fstable-queue.git 6.18-stable patches added patches: alsa-caiaq-don-t-abort-when-no-input-device-is-available.patch alsa-caiaq-fix-potentially-leftover-ep1_in_urb-at-error-path.patch driver-core-add-kernel-doc-for-dev_flag_count-enum-value.patch --- diff --git a/queue-6.18/alsa-caiaq-don-t-abort-when-no-input-device-is-available.patch b/queue-6.18/alsa-caiaq-don-t-abort-when-no-input-device-is-available.patch new file mode 100644 index 0000000000..b06cb0a10e --- /dev/null +++ b/queue-6.18/alsa-caiaq-don-t-abort-when-no-input-device-is-available.patch @@ -0,0 +1,50 @@ +From b32ae47a2b0a1fb4bd4942242847966d9b178222 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 27 Apr 2026 16:56:15 +0200 +Subject: ALSA: caiaq: Don't abort when no input device is available + +From: Takashi Iwai + +commit b32ae47a2b0a1fb4bd4942242847966d9b178222 upstream. + +The previous fix to handle the error from setup_card() caused a +regression for the models that have no dedicated input device; +snd_usb_caiaq_input_init() just returns -EINVAL, and we treat it as a +fatal error although it should be ignored. + +As a regression fix, change the error code to -ENODEV, and ignore this +error in the callee, to continue probing. + +Fixes: 28abd224db4a ("ALSA: caiaq: Handle probe errors properly") +Cc: +Link: https://bugzilla.kernel.org/show_bug.cgi?id=221423 +Link: https://patch.msgid.link/20260427145642.6637-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/caiaq/device.c | 2 +- + sound/usb/caiaq/input.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/usb/caiaq/device.c ++++ b/sound/usb/caiaq/device.c +@@ -366,7 +366,7 @@ static int setup_card(struct snd_usb_cai + + #ifdef CONFIG_SND_USB_CAIAQ_INPUT + ret = snd_usb_caiaq_input_init(cdev); +- if (ret < 0) { ++ if (ret < 0 && ret != -ENODEV) { + dev_err(dev, "Unable to set up input system (ret=%d)\n", ret); + return ret; + } +--- a/sound/usb/caiaq/input.c ++++ b/sound/usb/caiaq/input.c +@@ -804,7 +804,7 @@ int snd_usb_caiaq_input_init(struct snd_ + + default: + /* no input methods supported on this device */ +- ret = -EINVAL; ++ ret = -ENODEV; + goto exit_free_idev; + } + diff --git a/queue-6.18/alsa-caiaq-fix-potentially-leftover-ep1_in_urb-at-error-path.patch b/queue-6.18/alsa-caiaq-fix-potentially-leftover-ep1_in_urb-at-error-path.patch new file mode 100644 index 0000000000..e1525b9849 --- /dev/null +++ b/queue-6.18/alsa-caiaq-fix-potentially-leftover-ep1_in_urb-at-error-path.patch @@ -0,0 +1,37 @@ +From 0a7b5221b5b51cc798fcfc3be00d02eade149d69 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 27 Apr 2026 14:37:53 +0200 +Subject: ALSA: caiaq: Fix potentially leftover ep1_in_urb at error path + +From: Takashi Iwai + +commit 0a7b5221b5b51cc798fcfc3be00d02eade149d69 upstream. + +The previous fix for handling the error from setup_card() missed that +an internal URB cdev->ep1_in_urb might have been already submitted +beforehand. In the normal case, this URB gets killed at the +disconnection, but in the error path, we didn't do it, hence there can +be a potential leak. + +Fix it in the error path for setup_card(), too. + +Fixes: 28abd224db4a ("ALSA: caiaq: Handle probe errors properly") +Cc: +Link: https://patch.msgid.link/20260427123819.890185-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/caiaq/device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/usb/caiaq/device.c ++++ b/sound/usb/caiaq/device.c +@@ -514,7 +514,7 @@ static int init_card(struct snd_usb_caia + card->private_free = card_free; + err = setup_card(cdev); + if (err < 0) +- return err; ++ goto err_kill_urb; + + return 0; + diff --git a/queue-6.18/driver-core-add-kernel-doc-for-dev_flag_count-enum-value.patch b/queue-6.18/driver-core-add-kernel-doc-for-dev_flag_count-enum-value.patch new file mode 100644 index 0000000000..180bb864ba --- /dev/null +++ b/queue-6.18/driver-core-add-kernel-doc-for-dev_flag_count-enum-value.patch @@ -0,0 +1,41 @@ +From 5b484311507b5d403c1f7a45f6aa3778549e268b Mon Sep 17 00:00:00 2001 +From: Douglas Anderson +Date: Mon, 13 Apr 2026 19:59:11 -0700 +Subject: driver core: Add kernel-doc for DEV_FLAG_COUNT enum value + +From: Douglas Anderson + +commit 5b484311507b5d403c1f7a45f6aa3778549e268b upstream. + +Even though nobody should use this value (except when declaring the +"flags" bitmap), kernel-doc still gets upset that it's not documented. +It reports: + + WARNING: ../include/linux/device.h:519 + Enum value 'DEV_FLAG_COUNT' not described in enum 'struct_device_flags' + +Add the description of DEV_FLAG_COUNT. + +Fixes: a2225b6e834a ("driver core: Don't let a device probe until it's ready") +Reported-by: Randy Dunlap +Closes: https://lore.kernel.org/f318cd43-81fd-48b9-abf7-92af85f12f91@infradead.org +Signed-off-by: Douglas Anderson +Tested-by: Randy Dunlap +Reviewed-by: Randy Dunlap +Link: https://patch.msgid.link/20260413195910.1.I23aca74fe2d3636a47df196a80920fecb2643220@changeid +Signed-off-by: Danilo Krummrich +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/device.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/linux/device.h ++++ b/include/linux/device.h +@@ -485,6 +485,7 @@ struct device_physical_location { + * + * @DEV_FLAG_READY_TO_PROBE: If set then device_add() has finished enough + * initialization that probe could be called. ++ * @DEV_FLAG_COUNT: Number of defined struct_device_flags. + */ + enum struct_device_flags { + DEV_FLAG_READY_TO_PROBE = 0, diff --git a/queue-6.18/series b/queue-6.18/series index a38d0fd266..0473b0b48c 100644 --- a/queue-6.18/series +++ b/queue-6.18/series @@ -261,3 +261,6 @@ net-qrtr-ns-limit-the-maximum-server-registration-per-node.patch net-qrtr-ns-limit-the-maximum-number-of-lookups.patch net-qrtr-ns-limit-the-total-number-of-nodes.patch crypto-authencesn-reject-short-ahash-digests-during-instance-creation.patch +driver-core-add-kernel-doc-for-dev_flag_count-enum-value.patch +alsa-caiaq-fix-potentially-leftover-ep1_in_urb-at-error-path.patch +alsa-caiaq-don-t-abort-when-no-input-device-is-available.patch