]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Oct 2012 23:49:37 +0000 (08:49 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Oct 2012 23:49:37 +0000 (08:49 +0900)
added patches:
alsa-aloop-add-locking-to-timer-access.patch
alsa-hda-limit-internal-mic-boost-for-asus-x202e.patch
alsa-usb-disable-broken-hw-volume-for-tenx-tp6911.patch
alsa-usb-support-for-original-xbox-communicator.patch
asoc-wm9712-fix-name-of-capture-switch.patch
mm-fix-invalidate_complete_page2-lock-ordering.patch
mm-thp-fix-pmd_present-for-split_huge_page-and-prot_none-with-thp.patch

queue-3.0/alsa-aloop-add-locking-to-timer-access.patch [new file with mode: 0644]
queue-3.0/alsa-hda-limit-internal-mic-boost-for-asus-x202e.patch [new file with mode: 0644]
queue-3.0/alsa-usb-disable-broken-hw-volume-for-tenx-tp6911.patch [new file with mode: 0644]
queue-3.0/alsa-usb-support-for-original-xbox-communicator.patch [new file with mode: 0644]
queue-3.0/asoc-wm9712-fix-name-of-capture-switch.patch [new file with mode: 0644]
queue-3.0/mm-fix-invalidate_complete_page2-lock-ordering.patch [new file with mode: 0644]
queue-3.0/mm-thp-fix-pmd_present-for-split_huge_page-and-prot_none-with-thp.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/alsa-aloop-add-locking-to-timer-access.patch b/queue-3.0/alsa-aloop-add-locking-to-timer-access.patch
new file mode 100644 (file)
index 0000000..68c92e1
--- /dev/null
@@ -0,0 +1,69 @@
+From d4f1e48bd11e3df6a26811f7a1f06c4225d92f7d Mon Sep 17 00:00:00 2001
+From: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
+Date: Sat, 29 Sep 2012 12:24:05 +0530
+Subject: ALSA: aloop - add locking to timer access
+
+From: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
+
+commit d4f1e48bd11e3df6a26811f7a1f06c4225d92f7d upstream.
+
+When the loopback timer handler is running, calling del_timer() (for STOP
+trigger) will not wait for the handler to complete before deactivating the
+timer. The timer gets rescheduled in the handler as usual. Then a subsequent
+START trigger will try to start the timer using add_timer() with a timer pending
+leading to a kernel panic.
+
+Serialize the calls to add_timer() and del_timer() using a spin lock to avoid
+this.
+
+Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
+Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/drivers/aloop.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/sound/drivers/aloop.c
++++ b/sound/drivers/aloop.c
+@@ -119,6 +119,7 @@ struct loopback_pcm {
+       unsigned int period_size_frac;
+       unsigned long last_jiffies;
+       struct timer_list timer;
++      spinlock_t timer_lock;
+ };
+ static struct platform_device *devices[SNDRV_CARDS];
+@@ -169,6 +170,7 @@ static void loopback_timer_start(struct
+       unsigned long tick;
+       unsigned int rate_shift = get_rate_shift(dpcm);
++      spin_lock(&dpcm->timer_lock);
+       if (rate_shift != dpcm->pcm_rate_shift) {
+               dpcm->pcm_rate_shift = rate_shift;
+               dpcm->period_size_frac = frac_pos(dpcm, dpcm->pcm_period_size);
+@@ -181,12 +183,15 @@ static void loopback_timer_start(struct
+       tick = (tick + dpcm->pcm_bps - 1) / dpcm->pcm_bps;
+       dpcm->timer.expires = jiffies + tick;
+       add_timer(&dpcm->timer);
++      spin_unlock(&dpcm->timer_lock);
+ }
+ static inline void loopback_timer_stop(struct loopback_pcm *dpcm)
+ {
++      spin_lock(&dpcm->timer_lock);
+       del_timer(&dpcm->timer);
+       dpcm->timer.expires = 0;
++      spin_unlock(&dpcm->timer_lock);
+ }
+ #define CABLE_VALID_PLAYBACK  (1 << SNDRV_PCM_STREAM_PLAYBACK)
+@@ -658,6 +663,7 @@ static int loopback_open(struct snd_pcm_
+       dpcm->substream = substream;
+       setup_timer(&dpcm->timer, loopback_timer_function,
+                   (unsigned long)dpcm);
++      spin_lock_init(&dpcm->timer_lock);
+       cable = loopback->cables[substream->number][dev];
+       if (!cable) {
diff --git a/queue-3.0/alsa-hda-limit-internal-mic-boost-for-asus-x202e.patch b/queue-3.0/alsa-hda-limit-internal-mic-boost-for-asus-x202e.patch
new file mode 100644 (file)
index 0000000..88a8b63
--- /dev/null
@@ -0,0 +1,67 @@
+From 4b527b6516ab1f0af8aaedd02dbf71ee2c1180f4 Mon Sep 17 00:00:00 2001
+From: David Henningsson <david.henningsson@canonical.com>
+Date: Tue, 18 Sep 2012 14:26:59 +0200
+Subject: ALSA: hda - limit internal mic boost for Asus X202E
+
+From: David Henningsson <david.henningsson@canonical.com>
+
+commit 4b527b6516ab1f0af8aaedd02dbf71ee2c1180f4 upstream.
+
+When the input gain for the internal mic is set to its maximum level,
+the background noise becomes so high - and any relevant signal clipped -
+that the setting becomes unusable. It is better to limit the amplification.
+
+BugLink: https://bugs.launchpad.net/bugs/1052460
+Signed-off-by: David Henningsson <david.henningsson@canonical.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_via.c |   29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+--- a/sound/pci/hda/patch_via.c
++++ b/sound/pci/hda/patch_via.c
+@@ -5724,6 +5724,32 @@ static void set_widgets_power_state_vt20
+                                   AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
+ }
++/*
++ * pin fix-up
++ */
++enum {
++      VIA_FIXUP_INTMIC_BOOST,
++};
++
++static void via_fixup_intmic_boost(struct hda_codec *codec,
++                                const struct hda_fixup *fix, int action)
++{
++      if (action == HDA_FIXUP_ACT_PRE_PROBE)
++              override_mic_boost(codec, 0x30, 0, 2, 40);
++}
++
++static const struct hda_fixup via_fixups[] = {
++      [VIA_FIXUP_INTMIC_BOOST] = {
++              .type = HDA_FIXUP_FUNC,
++              .v.func = via_fixup_intmic_boost,
++      },
++};
++
++static const struct snd_pci_quirk vt2002p_fixups[] = {
++      SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
++      {}
++};
++
+ /* patch for vt2002P */
+ static int patch_vt2002P(struct hda_codec *codec)
+ {
+@@ -5735,6 +5761,9 @@ static int patch_vt2002P(struct hda_code
+       if (spec == NULL)
+               return -ENOMEM;
++      snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups);
++      snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
++
+       /* automatic parse from the BIOS config */
+       err = vt2002P_parse_auto_config(codec);
+       if (err < 0) {
diff --git a/queue-3.0/alsa-usb-disable-broken-hw-volume-for-tenx-tp6911.patch b/queue-3.0/alsa-usb-disable-broken-hw-volume-for-tenx-tp6911.patch
new file mode 100644 (file)
index 0000000..d2adbe8
--- /dev/null
@@ -0,0 +1,42 @@
+From c10514394ef9e8de93a4ad8c8904d71dcd82c122 Mon Sep 17 00:00:00 2001
+From: David Henningsson <david.henningsson@canonical.com>
+Date: Thu, 20 Sep 2012 10:20:41 +0200
+Subject: ALSA: usb - disable broken hw volume for Tenx TP6911
+
+From: David Henningsson <david.henningsson@canonical.com>
+
+commit c10514394ef9e8de93a4ad8c8904d71dcd82c122 upstream.
+
+While going through Ubuntu bugs, I discovered this patch being
+posted and a confirmation that the patch works as expected.
+
+Finding out how the hw volume really works would be preferrable
+to just disabling the broken one, but this would be better than
+nothing.
+
+Credit: sndfnsdfin (qawsnews)
+BugLink: https://bugs.launchpad.net/bugs/559939
+Signed-off-by: David Henningsson <david.henningsson@canonical.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -1246,6 +1246,13 @@ static int parse_audio_feature_unit(stru
+               /* disable non-functional volume control */
+               master_bits &= ~UAC_CONTROL_BIT(UAC_FU_VOLUME);
+               break;
++      case USB_ID(0x1130, 0xf211):
++              snd_printk(KERN_INFO
++                         "usbmixer: volume control quirk for Tenx TP6911 Audio Headset\n");
++              /* disable non-functional volume control */
++              channels = 0;
++              break;
++
+       }
+       if (channels > 0)
+               first_ch_bits = snd_usb_combine_bytes(bmaControls + csize, csize);
diff --git a/queue-3.0/alsa-usb-support-for-original-xbox-communicator.patch b/queue-3.0/alsa-usb-support-for-original-xbox-communicator.patch
new file mode 100644 (file)
index 0000000..3b4215d
--- /dev/null
@@ -0,0 +1,81 @@
+From c05fce586d4da2dfe0309bef3795a8586e967bc3 Mon Sep 17 00:00:00 2001
+From: Marko Friedemann <mfr@bmx-chemnitz.de>
+Date: Mon, 3 Sep 2012 10:12:40 +0200
+Subject: ALSA: USB: Support for (original) Xbox Communicator
+
+From: Marko Friedemann <mfr@bmx-chemnitz.de>
+
+commit c05fce586d4da2dfe0309bef3795a8586e967bc3 upstream.
+
+Added support for Xbox Communicator to USB quirks.
+
+Signed-off-by: Marko Friedemann <mfr@bmx-chemnitz.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/quirks-table.h |   53 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 53 insertions(+)
+
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -2581,6 +2581,59 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+       }
+ },
++/* Microsoft XboxLive Headset/Xbox Communicator */
++{
++      USB_DEVICE(0x045e, 0x0283),
++      .bInterfaceClass = USB_CLASS_PER_INTERFACE,
++      .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
++              .vendor_name = "Microsoft",
++              .product_name = "XboxLive Headset/Xbox Communicator",
++              .ifnum = QUIRK_ANY_INTERFACE,
++              .type = QUIRK_COMPOSITE,
++              .data = &(const struct snd_usb_audio_quirk[]) {
++                      {
++                              /* playback */
++                              .ifnum = 0,
++                              .type = QUIRK_AUDIO_FIXED_ENDPOINT,
++                              .data = &(const struct audioformat) {
++                                      .formats = SNDRV_PCM_FMTBIT_S16_LE,
++                                      .channels = 1,
++                                      .iface = 0,
++                                      .altsetting = 0,
++                                      .altset_idx = 0,
++                                      .attributes = 0,
++                                      .endpoint = 0x04,
++                                      .ep_attr = 0x05,
++                                      .rates = SNDRV_PCM_RATE_CONTINUOUS,
++                                      .rate_min = 22050,
++                                      .rate_max = 22050
++                              }
++                      },
++                      {
++                              /* capture */
++                              .ifnum = 1,
++                              .type = QUIRK_AUDIO_FIXED_ENDPOINT,
++                              .data = &(const struct audioformat) {
++                                      .formats = SNDRV_PCM_FMTBIT_S16_LE,
++                                      .channels = 1,
++                                      .iface = 1,
++                                      .altsetting = 0,
++                                      .altset_idx = 0,
++                                      .attributes = 0,
++                                      .endpoint = 0x85,
++                                      .ep_attr = 0x05,
++                                      .rates = SNDRV_PCM_RATE_CONTINUOUS,
++                                      .rate_min = 16000,
++                                      .rate_max = 16000
++                              }
++                      },
++                      {
++                              .ifnum = -1
++                      }
++              }
++      }
++},
++
+ {
+       /*
+        * Some USB MIDI devices don't have an audio control interface,
diff --git a/queue-3.0/asoc-wm9712-fix-name-of-capture-switch.patch b/queue-3.0/asoc-wm9712-fix-name-of-capture-switch.patch
new file mode 100644 (file)
index 0000000..0fc76d6
--- /dev/null
@@ -0,0 +1,29 @@
+From 689185b78ba6fbe0042f662a468b5565909dff7a Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Tue, 31 Jul 2012 18:37:29 +0100
+Subject: ASoC: wm9712: Fix name of Capture Switch
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit 689185b78ba6fbe0042f662a468b5565909dff7a upstream.
+
+Help UIs associate it with the matching gain control.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/wm9712.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/wm9712.c
++++ b/sound/soc/codecs/wm9712.c
+@@ -144,7 +144,7 @@ SOC_SINGLE("Playback Attenuate (-6dB) Sw
+ SOC_SINGLE("Bass Volume", AC97_MASTER_TONE, 8, 15, 1),
+ SOC_SINGLE("Treble Volume", AC97_MASTER_TONE, 0, 15, 1),
+-SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),
++SOC_SINGLE("Capture Switch", AC97_REC_GAIN, 15, 1, 1),
+ SOC_ENUM("Capture Volume Steps", wm9712_enum[6]),
+ SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
+ SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0),
diff --git a/queue-3.0/mm-fix-invalidate_complete_page2-lock-ordering.patch b/queue-3.0/mm-fix-invalidate_complete_page2-lock-ordering.patch
new file mode 100644 (file)
index 0000000..a07cd77
--- /dev/null
@@ -0,0 +1,63 @@
+From ec4d9f626d5908b6052c2973f37992f1db52e967 Mon Sep 17 00:00:00 2001
+From: Hugh Dickins <hughd@google.com>
+Date: Mon, 8 Oct 2012 16:33:14 -0700
+Subject: mm: fix invalidate_complete_page2() lock ordering
+
+From: Hugh Dickins <hughd@google.com>
+
+commit ec4d9f626d5908b6052c2973f37992f1db52e967 upstream.
+
+In fuzzing with trinity, lockdep protested "possible irq lock inversion
+dependency detected" when isolate_lru_page() reenabled interrupts while
+still holding the supposedly irq-safe tree_lock:
+
+invalidate_inode_pages2
+  invalidate_complete_page2
+    spin_lock_irq(&mapping->tree_lock)
+    clear_page_mlock
+      isolate_lru_page
+        spin_unlock_irq(&zone->lru_lock)
+
+isolate_lru_page() is correct to enable interrupts unconditionally:
+invalidate_complete_page2() is incorrect to call clear_page_mlock() while
+holding tree_lock, which is supposed to nest inside lru_lock.
+
+Both truncate_complete_page() and invalidate_complete_page() call
+clear_page_mlock() before taking tree_lock to remove page from radix_tree.
+ I guess invalidate_complete_page2() preferred to test PageDirty (again)
+under tree_lock before committing to the munlock; but since the page has
+already been unmapped, its state is already somewhat inconsistent, and no
+worse if clear_page_mlock() moved up.
+
+Reported-by: Sasha Levin <levinsasha928@gmail.com>
+Deciphered-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Acked-by: Mel Gorman <mel@csn.ul.ie>
+Cc: Rik van Riel <riel@redhat.com>
+Cc: Johannes Weiner <hannes@cmpxchg.org>
+Cc: Michel Lespinasse <walken@google.com>
+Cc: Ying Han <yinghan@google.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/truncate.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/mm/truncate.c
++++ b/mm/truncate.c
+@@ -398,11 +398,12 @@ invalidate_complete_page2(struct address
+       if (page_has_private(page) && !try_to_release_page(page, GFP_KERNEL))
+               return 0;
++      clear_page_mlock(page);
++
+       spin_lock_irq(&mapping->tree_lock);
+       if (PageDirty(page))
+               goto failed;
+-      clear_page_mlock(page);
+       BUG_ON(page_has_private(page));
+       __delete_from_page_cache(page);
+       spin_unlock_irq(&mapping->tree_lock);
diff --git a/queue-3.0/mm-thp-fix-pmd_present-for-split_huge_page-and-prot_none-with-thp.patch b/queue-3.0/mm-thp-fix-pmd_present-for-split_huge_page-and-prot_none-with-thp.patch
new file mode 100644 (file)
index 0000000..b78dae6
--- /dev/null
@@ -0,0 +1,72 @@
+From 027ef6c87853b0a9df53175063028edb4950d476 Mon Sep 17 00:00:00 2001
+From: Andrea Arcangeli <aarcange@redhat.com>
+Date: Mon, 8 Oct 2012 16:33:27 -0700
+Subject: mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP
+
+From: Andrea Arcangeli <aarcange@redhat.com>
+
+commit 027ef6c87853b0a9df53175063028edb4950d476 upstream.
+
+In many places !pmd_present has been converted to pmd_none.  For pmds
+that's equivalent and pmd_none is quicker so using pmd_none is better.
+
+However (unless we delete pmd_present) we should provide an accurate
+pmd_present too.  This will avoid the risk of code thinking the pmd is non
+present because it's under __split_huge_page_map, see the pmd_mknotpresent
+there and the comment above it.
+
+If the page has been mprotected as PROT_NONE, it would also lead to a
+pmd_present false negative in the same way as the race with
+split_huge_page.
+
+Because the PSE bit stays on at all times (both during split_huge_page and
+when the _PAGE_PROTNONE bit get set), we could only check for the PSE bit,
+but checking the PROTNONE bit too is still good to remember pmd_present
+must always keep PROT_NONE into account.
+
+This explains a not reproducible BUG_ON that was seldom reported on the
+lists.
+
+The same issue is in pmd_large, it would go wrong with both PROT_NONE and
+if it races with split_huge_page.
+
+Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
+Acked-by: Rik van Riel <riel@redhat.com>
+Cc: Johannes Weiner <jweiner@redhat.com>
+Cc: Hugh Dickins <hughd@google.com>
+Cc: Mel Gorman <mgorman@suse.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/include/asm/pgtable.h |   11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/include/asm/pgtable.h
++++ b/arch/x86/include/asm/pgtable.h
+@@ -146,8 +146,7 @@ static inline unsigned long pmd_pfn(pmd_
+ static inline int pmd_large(pmd_t pte)
+ {
+-      return (pmd_flags(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
+-              (_PAGE_PSE | _PAGE_PRESENT);
++      return pmd_flags(pte) & _PAGE_PSE;
+ }
+ #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+@@ -415,7 +414,13 @@ static inline int pte_hidden(pte_t pte)
+ static inline int pmd_present(pmd_t pmd)
+ {
+-      return pmd_flags(pmd) & _PAGE_PRESENT;
++      /*
++       * Checking for _PAGE_PSE is needed too because
++       * split_huge_page will temporarily clear the present bit (but
++       * the _PAGE_PSE flag will remain set at all times while the
++       * _PAGE_PRESENT bit is clear).
++       */
++      return pmd_flags(pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_PSE);
+ }
+ static inline int pmd_none(pmd_t pmd)
index 69469e0ce49128e25a1b0820cf770cf7c6ac0e94..5df85ff7579833ead8b4707aeca9e0fbb6715a49 100644 (file)
@@ -47,3 +47,10 @@ pci-check-p2p-bridge-for-invalid-secondary-subordinate-range.patch
 ext4-online-defrag-is-not-supported-for-journaled-files.patch
 ext4-always-set-i_op-in-ext4_mknod.patch
 ext4-fix-fdatasync-for-files-with-only-i_size-changes.patch
+asoc-wm9712-fix-name-of-capture-switch.patch
+mm-fix-invalidate_complete_page2-lock-ordering.patch
+mm-thp-fix-pmd_present-for-split_huge_page-and-prot_none-with-thp.patch
+alsa-aloop-add-locking-to-timer-access.patch
+alsa-hda-limit-internal-mic-boost-for-asus-x202e.patch
+alsa-usb-disable-broken-hw-volume-for-tenx-tp6911.patch
+alsa-usb-support-for-original-xbox-communicator.patch