]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Jun 2012 18:32:57 +0000 (11:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Jun 2012 18:32:57 +0000 (11:32 -0700)
added patches:
alsa-usb-audio-fix-rate_list-memory-leak.patch
vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch

queue-3.0/alsa-usb-audio-fix-rate_list-memory-leak.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch [new file with mode: 0644]

diff --git a/queue-3.0/alsa-usb-audio-fix-rate_list-memory-leak.patch b/queue-3.0/alsa-usb-audio-fix-rate_list-memory-leak.patch
new file mode 100644 (file)
index 0000000..c2974f9
--- /dev/null
@@ -0,0 +1,33 @@
+From 5cd5d7c44990658df6ab49f6253c39617c53b03d Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Fri, 18 May 2012 18:00:43 +0200
+Subject: ALSA: usb-audio: fix rate_list memory leak
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit 5cd5d7c44990658df6ab49f6253c39617c53b03d upstream.
+
+The array of sample rates is reallocated every time when opening
+the PCM device, but was freed only once when unplugging the device.
+
+Reported-by: "Alexander E. Patrakov" <patrakov@gmail.com>
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/pcm.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/sound/usb/pcm.c
++++ b/sound/usb/pcm.c
+@@ -670,6 +670,9 @@ static int snd_usb_pcm_check_knot(struct
+       int count = 0, needs_knot = 0;
+       int err;
++      kfree(subs->rate_list.list);
++      subs->rate_list.list = NULL;
++
+       list_for_each_entry(fp, &subs->fmt_list, list) {
+               if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS)
+                       return 0;
index 62f3136bab875b4356d76e9d89ef038791d95d6a..efdc7b2ec625c85b6d896a6d18c21ed91d0cdb8b 100644 (file)
@@ -21,3 +21,5 @@ bluetooth-btusb-add-vendor-specific-id-0489-e042-for-bcm20702a0.patch
 bluetooth-btusb-typo-in-broadcom-softsailing-id.patch
 add-foxconn-hon-hai-ids-for-btusb-module.patch
 bluetooth-add-support-for-foxconn-hon-hai-ar5bbu22-0489-e03c.patch
+alsa-usb-audio-fix-rate_list-memory-leak.patch
+vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch
diff --git a/queue-3.0/vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch b/queue-3.0/vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch
new file mode 100644 (file)
index 0000000..0ceab64
--- /dev/null
@@ -0,0 +1,34 @@
+From 63d37a84ab6004c235314ffd7a76c5eb28c2fae0 Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@zeniv.linux.org.uk>
+Date: Tue, 29 May 2012 22:03:48 -0400
+Subject: vfs: umount_tree() might be called on subtree that had never made it
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+commit 63d37a84ab6004c235314ffd7a76c5eb28c2fae0 upstream.
+
+__mnt_make_shortterm() in there undoes the effect of __mnt_make_longterm()
+we'd done back when we set ->mnt_ns non-NULL; it should not be done to
+vfsmounts that had never gone through commit_tree() and friends.  Kudos to
+lczerner for catching that one...
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/namespace.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -1244,8 +1244,9 @@ void umount_tree(struct vfsmount *mnt, i
+               list_del_init(&p->mnt_expire);
+               list_del_init(&p->mnt_list);
+               __touch_mnt_namespace(p->mnt_ns);
++              if (p->mnt_ns)
++                      __mnt_make_shortterm(p);
+               p->mnt_ns = NULL;
+-              __mnt_make_shortterm(p);
+               list_del_init(&p->mnt_child);
+               if (p->mnt_parent != p) {
+                       p->mnt_parent->mnt_ghosts++;