From 74eae5e8e094079112b474beed7b289e409e2d77 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 2 Jun 2012 11:32:57 -0700 Subject: [PATCH] 3.0-stable patches 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 --- ...-usb-audio-fix-rate_list-memory-leak.patch | 33 ++++++++++++++++++ queue-3.0/series | 2 ++ ...ed-on-subtree-that-had-never-made-it.patch | 34 +++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 queue-3.0/alsa-usb-audio-fix-rate_list-memory-leak.patch create mode 100644 queue-3.0/vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch 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 index 00000000000..c2974f9ffd7 --- /dev/null +++ b/queue-3.0/alsa-usb-audio-fix-rate_list-memory-leak.patch @@ -0,0 +1,33 @@ +From 5cd5d7c44990658df6ab49f6253c39617c53b03d Mon Sep 17 00:00:00 2001 +From: Clemens Ladisch +Date: Fri, 18 May 2012 18:00:43 +0200 +Subject: ALSA: usb-audio: fix rate_list memory leak + +From: Clemens Ladisch + +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" +Signed-off-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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; diff --git a/queue-3.0/series b/queue-3.0/series index 62f3136bab8..efdc7b2ec62 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -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 index 00000000000..0ceab64aa13 --- /dev/null +++ b/queue-3.0/vfs-umount_tree-might-be-called-on-subtree-that-had-never-made-it.patch @@ -0,0 +1,34 @@ +From 63d37a84ab6004c235314ffd7a76c5eb28c2fae0 Mon Sep 17 00:00:00 2001 +From: Al Viro +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 + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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++; -- 2.47.3