From: Greg Kroah-Hartman Date: Mon, 14 Nov 2022 10:18:23 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v5.10.155~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=526b0ea4aa9b271928e515f2f5c1314bdb1d7551;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: alsa-hda-fix-potential-memleak-in-add_widget_node.patch alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch --- diff --git a/queue-4.14/alsa-hda-fix-potential-memleak-in-add_widget_node.patch b/queue-4.14/alsa-hda-fix-potential-memleak-in-add_widget_node.patch new file mode 100644 index 00000000000..5e7ab98b4d3 --- /dev/null +++ b/queue-4.14/alsa-hda-fix-potential-memleak-in-add_widget_node.patch @@ -0,0 +1,36 @@ +From 9a5523f72bd2b0d66eef3d58810c6eb7b5ffc143 Mon Sep 17 00:00:00 2001 +From: Ye Bin +Date: Thu, 10 Nov 2022 22:45:39 +0800 +Subject: ALSA: hda: fix potential memleak in 'add_widget_node' + +From: Ye Bin + +commit 9a5523f72bd2b0d66eef3d58810c6eb7b5ffc143 upstream. + +As 'kobject_add' may allocated memory for 'kobject->name' when return error. +And in this function, if call 'kobject_add' failed didn't free kobject. +So call 'kobject_put' to recycling resources. + +Signed-off-by: Ye Bin +Cc: +Link: https://lore.kernel.org/r/20221110144539.2989354-1-yebin@huaweicloud.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/hda/hdac_sysfs.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/sound/hda/hdac_sysfs.c ++++ b/sound/hda/hdac_sysfs.c +@@ -346,8 +346,10 @@ static int add_widget_node(struct kobjec + return -ENOMEM; + kobject_init(kobj, &widget_ktype); + err = kobject_add(kobj, parent, "%02x", nid); +- if (err < 0) ++ if (err < 0) { ++ kobject_put(kobj); + return err; ++ } + err = sysfs_create_group(kobj, group); + if (err < 0) { + kobject_put(kobj); diff --git a/queue-4.14/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch b/queue-4.14/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch new file mode 100644 index 00000000000..2f10dea9e9d --- /dev/null +++ b/queue-4.14/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch @@ -0,0 +1,36 @@ +From 2f01a612d4758b45f775dbb88a49cf534ba47275 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 8 Nov 2022 15:07:21 +0100 +Subject: ALSA: usb-audio: Add quirk entry for M-Audio Micro + +From: Takashi Iwai + +commit 2f01a612d4758b45f775dbb88a49cf534ba47275 upstream. + +M-Audio Micro (0762:201a) defines the descriptor as vendor-specific, +while the content seems class-compliant. Just overriding the probe +makes the device working. + +Reported-by: Ash Logan +Cc: +Link: https://lore.kernel.org/r/7ecd4417-d860-4773-c1c1-b07433342390@heyquark.com +Link: https://lore.kernel.org/r/20221108140721.24248-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks-table.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -2090,6 +2090,10 @@ YAMAHA_DEVICE(0x7010, "UB99"), + } + }, + { ++ /* M-Audio Micro */ ++ USB_DEVICE_VENDOR_SPEC(0x0763, 0x201a), ++}, ++{ + USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030), + .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { + /* .vendor_name = "M-Audio", */ diff --git a/queue-4.14/series b/queue-4.14/series index b76acec9933..16570bef134 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -15,3 +15,5 @@ ethernet-s2io-disable-napi-when-start-nic-failed-in-.patch net-mv643xx_eth-disable-napi-when-init-rxq-or-txq-fa.patch net-macvlan-fix-memory-leaks-of-macvlan_common_newli.patch arm64-efi-fix-handling-of-misaligned-runtime-regions-and-drop-warning.patch +alsa-hda-fix-potential-memleak-in-add_widget_node.patch +alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch