Patch "ALSA: line6: Fix POD sysfs attributes segfault" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ALSA: line6: Fix POD sysfs attributes segfault
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-line6-fix-pod-sysfs-attributes-segfault.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b027d11263836a0cd335520175257dcb99b43757Mon Sep 17 00:00:00 2001
From: Andrej Krutak <[email protected]>
Date: Thu, 18 Aug 2016 23:52:12 +0200
Subject: ALSA: line6: Fix POD sysfs attributes segfault
From: Andrej Krutak <[email protected]>
commit b027d11263836a0cd335520175257dcb99b43757 upstream.
The commit 02fc76f6a changed base of the sysfs attributes from device to card. The "show" callbacks dereferenced wrong objects because of this.
--- sound/usb/line6/pod.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
sound/usb/line6/pod.c +6 -6
@@ -244,8 +244,8 @@ static int pod_set_system_param_int(strustatic ssize_t serial_number_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct usb_interface *interface =to_usb_interface (dev); -struct usb_line6_pod *pod =usb_get_intfdata (interface); +struct snd_card *card =dev_to_snd_card (dev); +struct usb_line6_pod *pod = card->private_data;return sprintf (buf,"%u\n" , pod->serial_number); }
@@ -256,8 +256,8 @@ static ssize_t serial_number_show(structstatic ssize_t firmware_version_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct usb_interface *interface =to_usb_interface (dev); -struct usb_line6_pod *pod =usb_get_intfdata (interface); +struct snd_card *card =dev_to_snd_card (dev); +struct usb_line6_pod *pod = card->private_data;return sprintf (buf,"%d.%02d\n" , pod->firmware_version /100 , pod->firmware_version %100 );
@@ -269,8 +269,8 @@ static ssize_t firmware_version_show(strstatic ssize_t device_id_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct usb_interface *interface =to_usb_interface (dev); -struct usb_line6_pod *pod =usb_get_intfdata (interface); +struct snd_card *card =dev_to_snd_card (dev); +struct usb_line6_pod *pod = card->private_data;return sprintf (buf,"%d\n" , pod->device_id); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/alsa-line6-give-up-on-the-lock-while-urbs-are-released.patch queue-4.4/alsa-line6-remove-double-line6_pcm_release-after-failed-acquire.patch queue-4.4/alsa-line6-fix-pod-sysfs-attributes-segfault.patch