]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Nov 2022 10:18:13 +0000 (11:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Nov 2022 10:18:13 +0000 (11:18 +0100)
added patches:
alsa-hda-fix-potential-memleak-in-add_widget_node.patch
alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch

queue-4.9/alsa-hda-fix-potential-memleak-in-add_widget_node.patch [new file with mode: 0644]
queue-4.9/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch [new file with mode: 0644]
queue-4.9/net-macvlan-fix-memory-leaks-of-macvlan_common_newli.patch
queue-4.9/series

diff --git a/queue-4.9/alsa-hda-fix-potential-memleak-in-add_widget_node.patch b/queue-4.9/alsa-hda-fix-potential-memleak-in-add_widget_node.patch
new file mode 100644 (file)
index 0000000..82d2088
--- /dev/null
@@ -0,0 +1,36 @@
+From 9a5523f72bd2b0d66eef3d58810c6eb7b5ffc143 Mon Sep 17 00:00:00 2001
+From: Ye Bin <yebin10@huawei.com>
+Date: Thu, 10 Nov 2022 22:45:39 +0800
+Subject: ALSA: hda: fix potential memleak in 'add_widget_node'
+
+From: Ye Bin <yebin10@huawei.com>
+
+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 <yebin10@huawei.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20221110144539.2989354-1-yebin@huaweicloud.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -345,8 +345,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.9/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch b/queue-4.9/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch
new file mode 100644 (file)
index 0000000..2f10dea
--- /dev/null
@@ -0,0 +1,36 @@
+From 2f01a612d4758b45f775dbb88a49cf534ba47275 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 8 Nov 2022 15:07:21 +0100
+Subject: ALSA: usb-audio: Add quirk entry for M-Audio Micro
+
+From: Takashi Iwai <tiwai@suse.de>
+
+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 <ash@heyquark.com>
+Cc: <stable@vger.kernel.org>
+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 <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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", */
index 65b624629d6bb27e17e722108ab61d7b64d15abc..777e585ee76b9a4e6f46133c37800caa305917ac 100644 (file)
@@ -44,14 +44,12 @@ Link: https://lore.kernel.org/r/20221109090735.690500-1-nashuiliang@gmail.com
 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/net/macvlan.c | 4 +++-
+ drivers/net/macvlan.c |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
-index 9dda2dc6b5e7..c8dbc0468ea2 100644
 --- a/drivers/net/macvlan.c
 +++ b/drivers/net/macvlan.c
-@@ -1392,8 +1392,10 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
+@@ -1392,8 +1392,10 @@ destroy_macvlan_port:
        /* the macvlan port may be freed by macvlan_uninit when fail to register.
         * so we destroy the macvlan port only when it's valid.
         */
@@ -63,6 +61,3 @@ index 9dda2dc6b5e7..c8dbc0468ea2 100644
        return err;
  }
  EXPORT_SYMBOL_GPL(macvlan_common_newlink);
--- 
-2.35.1
-
index 72fec173ee849bd32949ddea14cf3f069510961d..ef799417d7e6594515d6f5d0bb89969709e90fc1 100644 (file)
@@ -13,3 +13,5 @@ net-cxgb3_main-disable-napi-when-bind-qsets-failed-i.patch
 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
+alsa-hda-fix-potential-memleak-in-add_widget_node.patch
+alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch