]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Mar 2013 21:47:33 +0000 (14:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Mar 2013 21:47:33 +0000 (14:47 -0700)
added patches:
alsa-hda-cirrus-fix-the-digital-beep-registration.patch
alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch
alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch
alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch
alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch
saner-proc_get_inode-calling-conventions.patch
vfs-proc-guarantee-unique-inodes-in-proc.patch

queue-3.8/alsa-hda-cirrus-fix-the-digital-beep-registration.patch [new file with mode: 0644]
queue-3.8/alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch [new file with mode: 0644]
queue-3.8/alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch [new file with mode: 0644]
queue-3.8/alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch [new file with mode: 0644]
queue-3.8/alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch [new file with mode: 0644]
queue-3.8/saner-proc_get_inode-calling-conventions.patch [new file with mode: 0644]
queue-3.8/series
queue-3.8/vfs-proc-guarantee-unique-inodes-in-proc.patch [new file with mode: 0644]

diff --git a/queue-3.8/alsa-hda-cirrus-fix-the-digital-beep-registration.patch b/queue-3.8/alsa-hda-cirrus-fix-the-digital-beep-registration.patch
new file mode 100644 (file)
index 0000000..52cd0b5
--- /dev/null
@@ -0,0 +1,57 @@
+From a86b1a2cd2f81f74e815e07f756edd7bc5b6f034 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 18 Mar 2013 11:00:44 +0100
+Subject: ALSA: hda/cirrus - Fix the digital beep registration
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit a86b1a2cd2f81f74e815e07f756edd7bc5b6f034 upstream.
+
+The argument passed to snd_hda_attach_beep_device() is a widget NID
+while spec->beep_amp holds the composed value for amp controls.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_conexant.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/sound/pci/hda/patch_conexant.c
++++ b/sound/pci/hda/patch_conexant.c
+@@ -1175,7 +1175,7 @@ static int patch_cxt5045(struct hda_code
+       }
+       if (spec->beep_amp)
+-              snd_hda_attach_beep_device(codec, spec->beep_amp);
++              snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp));
+       return 0;
+ }
+@@ -1954,7 +1954,7 @@ static int patch_cxt5051(struct hda_code
+       }
+       if (spec->beep_amp)
+-              snd_hda_attach_beep_device(codec, spec->beep_amp);
++              snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp));
+       return 0;
+ }
+@@ -3136,7 +3136,7 @@ static int patch_cxt5066(struct hda_code
+       }
+       if (spec->beep_amp)
+-              snd_hda_attach_beep_device(codec, spec->beep_amp);
++              snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp));
+       return 0;
+ }
+@@ -4576,7 +4576,7 @@ static int patch_conexant_auto(struct hd
+       spec->capture_stream = &cx_auto_pcm_analog_capture;
+       codec->patch_ops = cx_auto_patch_ops;
+       if (spec->beep_amp)
+-              snd_hda_attach_beep_device(codec, spec->beep_amp);
++              snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp));
+       /* Some laptops with Conexant chips show stalls in S3 resume,
+        * which falls into the single-cmd mode.
diff --git a/queue-3.8/alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch b/queue-3.8/alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch
new file mode 100644 (file)
index 0000000..b0b4b5e
--- /dev/null
@@ -0,0 +1,32 @@
+From a686fd141e20244ad75f80ad54706da07d7bb90a Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 20 Mar 2013 15:42:00 +0100
+Subject: ALSA: hda - Fix typo in checking IEC958 emphasis bit
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit a686fd141e20244ad75f80ad54706da07d7bb90a upstream.
+
+There is a typo in convert_to_spdif_status() about checking the
+emphasis IEC958 status bit.  It should check the given value instead
+of the resultant value.
+
+Reported-by: Martin Weishart <martin.weishart@telosalliance.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_codec.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/hda/hda_codec.c
++++ b/sound/pci/hda/hda_codec.c
+@@ -2967,7 +2967,7 @@ static unsigned int convert_to_spdif_sta
+       if (val & AC_DIG1_PROFESSIONAL)
+               sbits |= IEC958_AES0_PROFESSIONAL;
+       if (sbits & IEC958_AES0_PROFESSIONAL) {
+-              if (sbits & AC_DIG1_EMPHASIS)
++              if (val & AC_DIG1_EMPHASIS)
+                       sbits |= IEC958_AES0_PRO_EMPHASIS_5015;
+       } else {
+               if (val & AC_DIG1_EMPHASIS)
diff --git a/queue-3.8/alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch b/queue-3.8/alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch
new file mode 100644 (file)
index 0000000..cdb7bd6
--- /dev/null
@@ -0,0 +1,57 @@
+From 83ea5d18d74f032a760fecde78c0210f66f7f70c Mon Sep 17 00:00:00 2001
+From: Daniel Mack <zonque@gmail.com>
+Date: Tue, 19 Mar 2013 21:09:25 +0100
+Subject: ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls()
+
+From: Daniel Mack <zonque@gmail.com>
+
+commit 83ea5d18d74f032a760fecde78c0210f66f7f70c upstream.
+
+Creation of individual mixer controls may fail, but that shouldn't cause
+the entire mixer creation to fail. Even worse, if the mixer creation
+fails, that will error out the entire device probing.
+
+All the functions called by parse_audio_unit() should return -EINVAL if
+they find descriptors that are unsupported or believed to be malformed,
+so we can safely handle this error code as a non-fatal condition in
+snd_usb_mixer_controls().
+
+That fixes a long standing bug which is commonly worked around by
+adding quirks which make the driver ignore entire interfaces. Some of
+them might now be unnecessary.
+
+Signed-off-by: Daniel Mack <zonque@gmail.com>
+Reported-and-tested-by: Rodolfo Thomazelli <pe.soberbo@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -2122,7 +2122,7 @@ static int snd_usb_mixer_controls(struct
+                       state.oterm.type = le16_to_cpu(desc->wTerminalType);
+                       state.oterm.name = desc->iTerminal;
+                       err = parse_audio_unit(&state, desc->bSourceID);
+-                      if (err < 0)
++                      if (err < 0 && err != -EINVAL)
+                               return err;
+               } else { /* UAC_VERSION_2 */
+                       struct uac2_output_terminal_descriptor *desc = p;
+@@ -2134,12 +2134,12 @@ static int snd_usb_mixer_controls(struct
+                       state.oterm.type = le16_to_cpu(desc->wTerminalType);
+                       state.oterm.name = desc->iTerminal;
+                       err = parse_audio_unit(&state, desc->bSourceID);
+-                      if (err < 0)
++                      if (err < 0 && err != -EINVAL)
+                               return err;
+                       /* for UAC2, use the same approach to also add the clock selectors */
+                       err = parse_audio_unit(&state, desc->bCSourceID);
+-                      if (err < 0)
++                      if (err < 0 && err != -EINVAL)
+                               return err;
+               }
+       }
diff --git a/queue-3.8/alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch b/queue-3.8/alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch
new file mode 100644 (file)
index 0000000..dbfcd70
--- /dev/null
@@ -0,0 +1,47 @@
+From 4d7b86c98e445b075c2c4c3757eb6d3d6efbe72e Mon Sep 17 00:00:00 2001
+From: Daniel Mack <zonque@gmail.com>
+Date: Tue, 19 Mar 2013 21:09:24 +0100
+Subject: ALSA: snd-usb: mixer: propagate errors up the call chain
+
+From: Daniel Mack <zonque@gmail.com>
+
+commit 4d7b86c98e445b075c2c4c3757eb6d3d6efbe72e upstream.
+
+In check_input_term() and parse_audio_feature_unit(), propagate the
+error value that has been returned by a failing function instead of
+-EINVAL. That helps cleaning up the error pathes in the mixer.
+
+Signed-off-by: Daniel Mack <zonque@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -715,8 +715,9 @@ static int check_input_term(struct mixer
+               case UAC2_CLOCK_SELECTOR: {
+                       struct uac_selector_unit_descriptor *d = p1;
+                       /* call recursively to retrieve the channel info */
+-                      if (check_input_term(state, d->baSourceID[0], term) < 0)
+-                              return -ENODEV;
++                      err = check_input_term(state, d->baSourceID[0], term);
++                      if (err < 0)
++                              return err;
+                       term->type = d->bDescriptorSubtype << 16; /* virtual type */
+                       term->id = id;
+                       term->name = uac_selector_unit_iSelector(d);
+@@ -1356,8 +1357,9 @@ static int parse_audio_feature_unit(stru
+               return err;
+       /* determine the input source type and name */
+-      if (check_input_term(state, hdr->bSourceID, &iterm) < 0)
+-              return -EINVAL;
++      err = check_input_term(state, hdr->bSourceID, &iterm);
++      if (err < 0)
++              return err;
+       master_bits = snd_usb_combine_bytes(bmaControls, csize);
+       /* master configuration quirks */
diff --git a/queue-3.8/alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch b/queue-3.8/alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch
new file mode 100644 (file)
index 0000000..5581f09
--- /dev/null
@@ -0,0 +1,45 @@
+From 61ac51301e6c6d4ed977d7674ce2b8e713619a9b Mon Sep 17 00:00:00 2001
+From: Torstein Hegge <hegge@resisty.net>
+Date: Tue, 19 Mar 2013 17:12:14 +0100
+Subject: ALSA: usb: Parse UAC2 extension unit like for UAC1
+
+From: Torstein Hegge <hegge@resisty.net>
+
+commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream.
+
+UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in
+the same way when parsing the unit. Otherwise parse_audio_unit() fails when it
+sees an extension unit on a UAC2 device.
+
+UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1.
+
+Signed-off-by: Torstein Hegge <hegge@resisty.net>
+Acked-by: Daniel Mack <zonque@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -725,7 +725,8 @@ static int check_input_term(struct mixer
+               case UAC1_PROCESSING_UNIT:
+               case UAC1_EXTENSION_UNIT:
+               /* UAC2_PROCESSING_UNIT_V2 */
+-              /* UAC2_EFFECT_UNIT */ {
++              /* UAC2_EFFECT_UNIT */
++              case UAC2_EXTENSION_UNIT_V2: {
+                       struct uac_processing_unit_descriptor *d = p1;
+                       if (state->mixer->protocol == UAC_VERSION_2 &&
+@@ -2051,6 +2052,8 @@ static int parse_audio_unit(struct mixer
+                       return parse_audio_extension_unit(state, unitid, p1);
+               else /* UAC_VERSION_2 */
+                       return parse_audio_processing_unit(state, unitid, p1);
++      case UAC2_EXTENSION_UNIT_V2:
++              return parse_audio_extension_unit(state, unitid, p1);
+       default:
+               snd_printk(KERN_ERR "usbaudio: unit %u: unexpected type 0x%02x\n", unitid, p1[2]);
+               return -EINVAL;
diff --git a/queue-3.8/saner-proc_get_inode-calling-conventions.patch b/queue-3.8/saner-proc_get_inode-calling-conventions.patch
new file mode 100644 (file)
index 0000000..20faacc
--- /dev/null
@@ -0,0 +1,98 @@
+From d3d009cb965eae7e002ea5badf603ea8f4c34915 Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@zeniv.linux.org.uk>
+Date: Fri, 25 Jan 2013 20:11:22 -0500
+Subject: saner proc_get_inode() calling conventions
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+commit d3d009cb965eae7e002ea5badf603ea8f4c34915 upstream.
+
+Make it drop the pde in *all* cases when no new reference to it is
+put into an inode - both when an inode had already been set up
+(as we were already doing) and when inode allocation has failed.
+Makes for simpler logics in callers...
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/proc/generic.c |   21 +++++++--------------
+ fs/proc/inode.c   |   10 +++-------
+ 2 files changed, 10 insertions(+), 21 deletions(-)
+
+--- a/fs/proc/generic.c
++++ b/fs/proc/generic.c
+@@ -412,8 +412,7 @@ static const struct dentry_operations pr
+ struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir,
+               struct dentry *dentry)
+ {
+-      struct inode *inode = NULL;
+-      int error = -ENOENT;
++      struct inode *inode;
+       spin_lock(&proc_subdir_lock);
+       for (de = de->subdir; de ; de = de->next) {
+@@ -422,22 +421,16 @@ struct dentry *proc_lookup_de(struct pro
+               if (!memcmp(dentry->d_name.name, de->name, de->namelen)) {
+                       pde_get(de);
+                       spin_unlock(&proc_subdir_lock);
+-                      error = -ENOMEM;
+                       inode = proc_get_inode(dir->i_sb, de);
+-                      goto out_unlock;
++                      if (!inode)
++                              return ERR_PTR(-ENOMEM);
++                      d_set_d_op(dentry, &proc_dentry_operations);
++                      d_add(dentry, inode);
++                      return NULL;
+               }
+       }
+       spin_unlock(&proc_subdir_lock);
+-out_unlock:
+-
+-      if (inode) {
+-              d_set_d_op(dentry, &proc_dentry_operations);
+-              d_add(dentry, inode);
+-              return NULL;
+-      }
+-      if (de)
+-              pde_put(de);
+-      return ERR_PTR(error);
++      return ERR_PTR(-ENOENT);
+ }
+ struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry,
+--- a/fs/proc/inode.c
++++ b/fs/proc/inode.c
+@@ -445,12 +445,9 @@ static const struct file_operations proc
+ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
+ {
+-      struct inode * inode;
++      struct inode *inode = iget_locked(sb, de->low_ino);
+-      inode = iget_locked(sb, de->low_ino);
+-      if (!inode)
+-              return NULL;
+-      if (inode->i_state & I_NEW) {
++      if (inode && (inode->i_state & I_NEW)) {
+               inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+               PROC_I(inode)->pde = de;
+@@ -482,7 +479,7 @@ struct inode *proc_get_inode(struct supe
+       } else
+              pde_put(de);
+       return inode;
+-}                     
++}
+ int proc_fill_super(struct super_block *s)
+ {
+@@ -499,6 +496,5 @@ int proc_fill_super(struct super_block *
+               return 0;
+       printk("proc_read_super: get root inode failed\n");
+-      pde_put(&proc_root);
+       return -ENOMEM;
+ }
index 3a9178930ff76aaf5b32c5fd88a30f4d53bd4e95..d99a90b05f068cb690e5e4ae2af128e15ffac69d 100644 (file)
@@ -26,3 +26,10 @@ sfc-fix-efx_rx_buf_offset-in-the-presence-of-swiotlb.patch
 sfc-detach-net-device-when-stopping-queues-for-reconfiguration.patch
 sfc-disable-soft-interrupt-handling-during-efx_device_detach_sync.patch
 sfc-only-use-tx-push-if-a-single-descriptor-is-to-be-written.patch
+alsa-hda-cirrus-fix-the-digital-beep-registration.patch
+alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch
+alsa-usb-parse-uac2-extension-unit-like-for-uac1.patch
+alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch
+alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch
+saner-proc_get_inode-calling-conventions.patch
+vfs-proc-guarantee-unique-inodes-in-proc.patch
diff --git a/queue-3.8/vfs-proc-guarantee-unique-inodes-in-proc.patch b/queue-3.8/vfs-proc-guarantee-unique-inodes-in-proc.patch
new file mode 100644 (file)
index 0000000..8c8a8d2
--- /dev/null
@@ -0,0 +1,65 @@
+From 51f0885e5415b4cc6535e9cdcc5145bfbc134353 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Fri, 22 Mar 2013 11:44:04 -0700
+Subject: vfs,proc: guarantee unique inodes in /proc
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 51f0885e5415b4cc6535e9cdcc5145bfbc134353 upstream.
+
+Dave Jones found another /proc issue with his Trinity tool: thanks to
+the namespace model, we can have multiple /proc dentries that point to
+the same inode, aliasing directories in /proc/<pid>/net/ for example.
+
+This ends up being a total disaster, because it acts like hardlinked
+directories, and causes locking problems.  We rely on the topological
+sort of the inodes pointed to by dentries, and if we have aliased
+directories, that odering becomes unreliable.
+
+In short: don't do this.  Multiple dentries with the same (directory)
+inode is just a bad idea, and the namespace code should never have
+exposed things this way.  But we're kind of stuck with it.
+
+This solves things by just always allocating a new inode during /proc
+dentry lookup, instead of using "iget_locked()" to look up existing
+inodes by superblock and number.  That actually simplies the code a bit,
+at the cost of potentially doing more inode [de]allocations.
+
+That said, the inode lookup wasn't free either (and did a lot of locking
+of inodes), so it is probably not that noticeable.  We could easily keep
+the old lookup model for non-directory entries, but rather than try to
+be excessively clever this just implements the minimal and simplest
+workaround for the problem.
+
+Reported-and-tested-by: Dave Jones <davej@redhat.com>
+Analyzed-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/proc/inode.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/fs/proc/inode.c
++++ b/fs/proc/inode.c
+@@ -445,9 +445,10 @@ static const struct file_operations proc
+ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
+ {
+-      struct inode *inode = iget_locked(sb, de->low_ino);
++      struct inode *inode = new_inode_pseudo(sb);
+-      if (inode && (inode->i_state & I_NEW)) {
++      if (inode) {
++              inode->i_ino = de->low_ino;
+               inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+               PROC_I(inode)->pde = de;
+@@ -475,7 +476,6 @@ struct inode *proc_get_inode(struct supe
+                               inode->i_fop = de->proc_fops;
+                       }
+               }
+-              unlock_new_inode(inode);
+       } else
+              pde_put(de);
+       return inode;