]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.5-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Aug 2012 18:19:10 +0000 (11:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Aug 2012 18:19:10 +0000 (11:19 -0700)
added patches:
alpha-don-t-export-sock_nonblock-to-user-space.patch
alpha-fix-fpu.h-usage-in-userspace.patch
asoc-omap-mcbsp-fix-6pin-mux-configuration.patch
asoc-wm9712-fix-microphone-source-selection.patch
mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch
usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch
vfs-canonicalize-create-mode-in-build_open_flags.patch
vfs-missed-source-of-f_pos-races.patch

queue-3.5/alpha-don-t-export-sock_nonblock-to-user-space.patch [new file with mode: 0644]
queue-3.5/alpha-fix-fpu.h-usage-in-userspace.patch [new file with mode: 0644]
queue-3.5/asoc-omap-mcbsp-fix-6pin-mux-configuration.patch [new file with mode: 0644]
queue-3.5/asoc-wm9712-fix-microphone-source-selection.patch [new file with mode: 0644]
queue-3.5/mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch [new file with mode: 0644]
queue-3.5/series
queue-3.5/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch [new file with mode: 0644]
queue-3.5/vfs-canonicalize-create-mode-in-build_open_flags.patch [new file with mode: 0644]
queue-3.5/vfs-missed-source-of-f_pos-races.patch [new file with mode: 0644]

diff --git a/queue-3.5/alpha-don-t-export-sock_nonblock-to-user-space.patch b/queue-3.5/alpha-don-t-export-sock_nonblock-to-user-space.patch
new file mode 100644 (file)
index 0000000..b5feb6c
--- /dev/null
@@ -0,0 +1,40 @@
+From a2fa3ccd7b43665fe14cb562761a6c3d26a1d13f Mon Sep 17 00:00:00 2001
+From: Michael Cree <mcree@orcon.net.nz>
+Date: Sun, 19 Aug 2012 14:40:56 +1200
+Subject: alpha: Don't export SOCK_NONBLOCK to user space.
+
+From: Michael Cree <mcree@orcon.net.nz>
+
+commit a2fa3ccd7b43665fe14cb562761a6c3d26a1d13f upstream.
+
+Currently we export SOCK_NONBLOCK to user space but that conflicts with
+the definition from glibc leading to compilation errors in user programs
+(e.g.  see Debian bug #658460).
+
+The generic socket.h restricts the definition of SOCK_NONBLOCK to the
+kernel, as does the MIPS specific socket.h, so let's do the same on
+Alpha.
+
+Signed-off-by: Michael Cree <mcree@orcon.net.nz>
+Acked-by: Matt Turner <mattst88@gmail.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/alpha/include/asm/socket.h |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/alpha/include/asm/socket.h
++++ b/arch/alpha/include/asm/socket.h
+@@ -76,9 +76,11 @@
+ /* Instruct lower device to use last 4-bytes of skb data as FCS */
+ #define SO_NOFCS              43
++#ifdef __KERNEL__
+ /* O_NONBLOCK clashes with the bits used for socket types.  Therefore we
+  * have to define SOCK_NONBLOCK to a different value here.
+  */
+ #define SOCK_NONBLOCK 0x40000000
++#endif /* __KERNEL__ */
+ #endif /* _ASM_SOCKET_H */
diff --git a/queue-3.5/alpha-fix-fpu.h-usage-in-userspace.patch b/queue-3.5/alpha-fix-fpu.h-usage-in-userspace.patch
new file mode 100644 (file)
index 0000000..5c2fa17
--- /dev/null
@@ -0,0 +1,41 @@
+From 0be421862b857e61964435ffcaa7499cf77a5e5a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 19 Aug 2012 14:41:02 +1200
+Subject: alpha: fix fpu.h usage in userspace
+
+From: Mike Frysinger <vapier@gentoo.org>
+
+commit 0be421862b857e61964435ffcaa7499cf77a5e5a upstream.
+
+After commit ec2212088c42 ("Disintegrate asm/system.h for Alpha"), the
+fpu.h header which we install for userland started depending on
+special_insns.h which is not installed.
+
+However, fpu.h only uses that for __KERNEL__ code, so protect the
+inclusion the same way to avoid build breakage in glibc:
+
+  /usr/include/asm/fpu.h:4:31: fatal error: asm/special_insns.h: No such file or directory
+
+Reported-by: Matt Turner <mattst88@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Michael Cree <mcree@orcon.net.nz>
+Acked-by: Matt Turner <mattst88@gmail.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/alpha/include/asm/fpu.h |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/alpha/include/asm/fpu.h
++++ b/arch/alpha/include/asm/fpu.h
+@@ -1,7 +1,9 @@
+ #ifndef __ASM_ALPHA_FPU_H
+ #define __ASM_ALPHA_FPU_H
++#ifdef __KERNEL__
+ #include <asm/special_insns.h>
++#endif
+ /*
+  * Alpha floating-point control register defines:
diff --git a/queue-3.5/asoc-omap-mcbsp-fix-6pin-mux-configuration.patch b/queue-3.5/asoc-omap-mcbsp-fix-6pin-mux-configuration.patch
new file mode 100644 (file)
index 0000000..c006ec5
--- /dev/null
@@ -0,0 +1,33 @@
+From d0db84e713eaaccea2a435e1625fb3150b335f4a Mon Sep 17 00:00:00 2001
+From: Peter Ujfalusi <peter.ujfalusi@ti.com>
+Date: Tue, 7 Aug 2012 15:37:47 +0300
+Subject: ASoC: omap-mcbsp: Fix 6pin mux configuration
+
+From: Peter Ujfalusi <peter.ujfalusi@ti.com>
+
+commit d0db84e713eaaccea2a435e1625fb3150b335f4a upstream.
+
+The check for the mux_signal callback was wrong which prevents us to
+configure the 6pin port's FSR/CLKR signal mux.
+
+Reported-by: CF Adad <cfadad@rocketmail.com>
+Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
+Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/omap/mcbsp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/omap/mcbsp.c
++++ b/sound/soc/omap/mcbsp.c
+@@ -745,7 +745,7 @@ int omap_mcbsp_6pin_src_mux(struct omap_
+ {
+       const char *signal, *src;
+-      if (mcbsp->pdata->mux_signal)
++      if (!mcbsp->pdata->mux_signal)
+               return -EINVAL;
+       switch (mux) {
diff --git a/queue-3.5/asoc-wm9712-fix-microphone-source-selection.patch b/queue-3.5/asoc-wm9712-fix-microphone-source-selection.patch
new file mode 100644 (file)
index 0000000..c16559f
--- /dev/null
@@ -0,0 +1,73 @@
+From ccf795847a38235ee4a56a24129ce75147d6ba8f Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Thu, 16 Aug 2012 22:36:04 +0100
+Subject: ASoC: wm9712: Fix microphone source selection
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit ccf795847a38235ee4a56a24129ce75147d6ba8f upstream.
+
+Currently the microphone input source is not selectable as while there is
+a DAPM widget it's not connected to anything so it won't be properly
+instantiated. Add something more correct for the input structure to get
+things going, even though it's not hooked into the rest of the routing
+map and so won't actually achieve anything except allowing the relevant
+register bits to be written.
+
+Reported-by: Christop Fritz <chf.fritz@googlemail.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/wm9712.c |   19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/codecs/wm9712.c
++++ b/sound/soc/codecs/wm9712.c
+@@ -272,7 +272,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]);
+ /* Mic select */
+ static const struct snd_kcontrol_new wm9712_mic_src_controls =
+-SOC_DAPM_ENUM("Route", wm9712_enum[7]);
++SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]);
+ /* diff select */
+ static const struct snd_kcontrol_new wm9712_diff_sel_controls =
+@@ -291,7 +291,9 @@ SND_SOC_DAPM_MUX("Left Capture Select",
+       &wm9712_capture_selectl_controls),
+ SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0,
+       &wm9712_capture_selectr_controls),
+-SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0,
++SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0,
++      &wm9712_mic_src_controls),
++SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0,
+       &wm9712_mic_src_controls),
+ SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0,
+       &wm9712_diff_sel_controls),
+@@ -319,6 +321,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_P
+ SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0),
+ SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0),
+ SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0),
++SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0),
+ SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1),
+ SND_SOC_DAPM_OUTPUT("MONOOUT"),
+ SND_SOC_DAPM_OUTPUT("HPOUTL"),
+@@ -379,6 +382,18 @@ static const struct snd_soc_dapm_route w
+       {"Mic PGA", NULL, "MIC1"},
+       {"Mic PGA", NULL, "MIC2"},
++      /* microphones */
++      {"Differential Mic", NULL, "MIC1"},
++      {"Differential Mic", NULL, "MIC2"},
++      {"Left Mic Select Source", "Mic 1", "MIC1"},
++      {"Left Mic Select Source", "Mic 2", "MIC2"},
++      {"Left Mic Select Source", "Stereo", "MIC1"},
++      {"Left Mic Select Source", "Differential", "Differential Mic"},
++      {"Right Mic Select Source", "Mic 1", "MIC1"},
++      {"Right Mic Select Source", "Mic 2", "MIC2"},
++      {"Right Mic Select Source", "Stereo", "MIC2"},
++      {"Right Mic Select Source", "Differential", "Differential Mic"},
++
+       /* left capture selector */
+       {"Left Capture Select", "Mic", "MIC1"},
+       {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"},
diff --git a/queue-3.5/mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch b/queue-3.5/mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch
new file mode 100644 (file)
index 0000000..40cf0b1
--- /dev/null
@@ -0,0 +1,86 @@
+From a1dca315ce3f78347bca8ce8befe3cc71ae63b7e Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Thu, 23 Aug 2012 15:35:26 +0200
+Subject: MIPS: pci-ar724x: avoid data bus error due to a missing PCIe module
+
+From: Gabor Juhos <juhosg@openwrt.org>
+
+commit a1dca315ce3f78347bca8ce8befe3cc71ae63b7e upstream.
+
+If the controller has no PCIe module attached, accessing of the device
+configuration space causes a data bus error. Avoid this by checking the
+status of the PCIe link in advance, and indicate an error if the link
+is down.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+Cc: linux-mips@linux-mips.org
+Patchwork: https://patchwork.linux-mips.org/patch/4293/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/pci/pci-ar724x.c |   22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/arch/mips/pci/pci-ar724x.c
++++ b/arch/mips/pci/pci-ar724x.c
+@@ -23,9 +23,12 @@
+ #define AR724X_PCI_MEM_BASE   0x10000000
+ #define AR724X_PCI_MEM_SIZE   0x08000000
++#define AR724X_PCI_REG_RESET          0x18
+ #define AR724X_PCI_REG_INT_STATUS     0x4c
+ #define AR724X_PCI_REG_INT_MASK               0x50
++#define AR724X_PCI_RESET_LINK_UP      BIT(0)
++
+ #define AR724X_PCI_INT_DEV0           BIT(14)
+ #define AR724X_PCI_IRQ_COUNT          1
+@@ -38,6 +41,15 @@ static void __iomem *ar724x_pci_ctrl_bas
+ static u32 ar724x_pci_bar0_value;
+ static bool ar724x_pci_bar0_is_cached;
++static bool ar724x_pci_link_up;
++
++static inline bool ar724x_pci_check_link(void)
++{
++      u32 reset;
++
++      reset = __raw_readl(ar724x_pci_ctrl_base + AR724X_PCI_REG_RESET);
++      return reset & AR724X_PCI_RESET_LINK_UP;
++}
+ static int ar724x_pci_read(struct pci_bus *bus, unsigned int devfn, int where,
+                           int size, uint32_t *value)
+@@ -46,6 +58,9 @@ static int ar724x_pci_read(struct pci_bu
+       void __iomem *base;
+       u32 data;
++      if (!ar724x_pci_link_up)
++              return PCIBIOS_DEVICE_NOT_FOUND;
++
+       if (devfn)
+               return PCIBIOS_DEVICE_NOT_FOUND;
+@@ -96,6 +111,9 @@ static int ar724x_pci_write(struct pci_b
+       u32 data;
+       int s;
++      if (!ar724x_pci_link_up)
++              return PCIBIOS_DEVICE_NOT_FOUND;
++
+       if (devfn)
+               return PCIBIOS_DEVICE_NOT_FOUND;
+@@ -280,6 +298,10 @@ int __init ar724x_pcibios_init(int irq)
+       if (ar724x_pci_ctrl_base == NULL)
+               goto err_unmap_devcfg;
++      ar724x_pci_link_up = ar724x_pci_check_link();
++      if (!ar724x_pci_link_up)
++              pr_warn("ar724x: PCIe link is down\n");
++
+       ar724x_pci_irq_init(irq);
+       register_pci_controller(&ar724x_pci_controller);
index 24855c54e2ad7122ab1b25e12a5446d5422e3f22..1c94da2ae0173d55b2d6c243c3b8e851349e717f 100644 (file)
@@ -14,3 +14,11 @@ arm-imx6-spin-the-cpu-until-hardware-takes-it-down.patch
 arm-imx-build-pm-imx5-code-only-when-pm-is-enabled.patch
 arm-imx-select-cpu_freq_table-when-needed.patch
 arm-imx-build-i.mx6-functions-only-when-needed.patch
+mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch
+asoc-wm9712-fix-microphone-source-selection.patch
+asoc-omap-mcbsp-fix-6pin-mux-configuration.patch
+vfs-missed-source-of-f_pos-races.patch
+vfs-canonicalize-create-mode-in-build_open_flags.patch
+alpha-fix-fpu.h-usage-in-userspace.patch
+alpha-don-t-export-sock_nonblock-to-user-space.patch
+usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch
diff --git a/queue-3.5/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch b/queue-3.5/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch
new file mode 100644 (file)
index 0000000..3472e13
--- /dev/null
@@ -0,0 +1,39 @@
+From 43a34695d9cd79c6659f09da6d3b0624f3dd169f Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 17 Aug 2012 17:48:37 -0700
+Subject: USB: winbond: remove __devinit* from the struct usb_device_id table
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 43a34695d9cd79c6659f09da6d3b0624f3dd169f upstream.
+
+This structure needs to always stick around, even if CONFIG_HOTPLUG
+is disabled, otherwise we can oops when trying to probe a device that
+was added after the structure is thrown away.
+
+Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.
+
+Reported-by: Fengguang Wu <fengguang.wu@intel.com>
+Reported-by: Bjørn Mork <bjorn@mork.no>
+CC: Pavel Machek <pavel@ucw.cz>
+CC: Paul Gortmaker <paul.gortmaker@windriver.com>
+CC: "John W. Linville" <linville@tuxdriver.com>
+CC: Eliad Peller <eliad@wizery.com>
+CC: Devendra Naga <devendra.aaru@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/winbond/wbusb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/winbond/wbusb.c
++++ b/drivers/staging/winbond/wbusb.c
+@@ -25,7 +25,7 @@ MODULE_DESCRIPTION("IS89C35 802.11bg WLA
+ MODULE_LICENSE("GPL");
+ MODULE_VERSION("0.1");
+-static const struct usb_device_id wb35_table[] __devinitconst = {
++static const struct usb_device_id wb35_table[] = {
+       { USB_DEVICE(0x0416, 0x0035) },
+       { USB_DEVICE(0x18E8, 0x6201) },
+       { USB_DEVICE(0x18E8, 0x6206) },
diff --git a/queue-3.5/vfs-canonicalize-create-mode-in-build_open_flags.patch b/queue-3.5/vfs-canonicalize-create-mode-in-build_open_flags.patch
new file mode 100644 (file)
index 0000000..efb5c58
--- /dev/null
@@ -0,0 +1,41 @@
+From e68726ff72cf7ba5e7d789857fcd9a75ca573f03 Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@suse.cz>
+Date: Wed, 15 Aug 2012 13:01:24 +0200
+Subject: vfs: canonicalize create mode in build_open_flags()
+
+From: Miklos Szeredi <mszeredi@suse.cz>
+
+commit e68726ff72cf7ba5e7d789857fcd9a75ca573f03 upstream.
+
+Userspace can pass weird create mode in open(2) that we canonicalize to
+"(mode & S_IALLUGO) | S_IFREG" in vfs_create().
+
+The problem is that we use the uncanonicalized mode before calling vfs_create()
+with unforseen consequences.
+
+So do the canonicalization early in build_open_flags().
+
+Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
+Tested-by: Richard W.M. Jones <rjones@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/open.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -930,9 +930,10 @@ static inline int build_open_flags(int f
+       int lookup_flags = 0;
+       int acc_mode;
+-      if (!(flags & O_CREAT))
+-              mode = 0;
+-      op->mode = mode;
++      if (flags & O_CREAT)
++              op->mode = (mode & S_IALLUGO) | S_IFREG;
++      else
++              op->mode = 0;
+       /* Must never be set by userspace */
+       flags &= ~FMODE_NONOTIFY;
diff --git a/queue-3.5/vfs-missed-source-of-f_pos-races.patch b/queue-3.5/vfs-missed-source-of-f_pos-races.patch
new file mode 100644 (file)
index 0000000..3a7eb59
--- /dev/null
@@ -0,0 +1,54 @@
+From 0e665d5d1125f9f4ccff56a75e814f10f88861a2 Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@ZenIV.linux.org.uk>
+Date: Mon, 20 Aug 2012 15:28:00 +0100
+Subject: vfs: missed source of ->f_pos races
+
+From: Al Viro <viro@ZenIV.linux.org.uk>
+
+commit 0e665d5d1125f9f4ccff56a75e814f10f88861a2 upstream.
+
+compat_sys_{read,write}v() need the same "pass a copy of file->f_pos" thing
+as sys_{read,write}{,v}().
+
+Signed-off-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/compat.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/fs/compat.c
++++ b/fs/compat.c
+@@ -1155,11 +1155,14 @@ compat_sys_readv(unsigned long fd, const
+       struct file *file;
+       int fput_needed;
+       ssize_t ret;
++      loff_t pos;
+       file = fget_light(fd, &fput_needed);
+       if (!file)
+               return -EBADF;
+-      ret = compat_readv(file, vec, vlen, &file->f_pos);
++      pos = file->f_pos;
++      ret = compat_readv(file, vec, vlen, &pos);
++      file->f_pos = pos;
+       fput_light(file, fput_needed);
+       return ret;
+ }
+@@ -1221,11 +1224,14 @@ compat_sys_writev(unsigned long fd, cons
+       struct file *file;
+       int fput_needed;
+       ssize_t ret;
++      loff_t pos;
+       file = fget_light(fd, &fput_needed);
+       if (!file)
+               return -EBADF;
+-      ret = compat_writev(file, vec, vlen, &file->f_pos);
++      pos = file->f_pos;
++      ret = compat_writev(file, vec, vlen, &pos);
++      file->f_pos = pos;
+       fput_light(file, fput_needed);
+       return ret;
+ }