From: Greg Kroah-Hartman Date: Mon, 27 Aug 2012 18:18:54 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.5.4~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7bb15bd39fbfd73f1fd119bb840deaaed84e9fcd;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: alpha-don-t-export-sock_nonblock-to-user-space.patch asoc-wm9712-fix-microphone-source-selection.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 --- diff --git a/queue-3.0/alpha-don-t-export-sock_nonblock-to-user-space.patch b/queue-3.0/alpha-don-t-export-sock_nonblock-to-user-space.patch new file mode 100644 index 00000000000..bcc58525b68 --- /dev/null +++ b/queue-3.0/alpha-don-t-export-sock_nonblock-to-user-space.patch @@ -0,0 +1,40 @@ +From a2fa3ccd7b43665fe14cb562761a6c3d26a1d13f Mon Sep 17 00:00:00 2001 +From: Michael Cree +Date: Sun, 19 Aug 2012 14:40:56 +1200 +Subject: alpha: Don't export SOCK_NONBLOCK to user space. + +From: Michael Cree + +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 +Acked-by: Matt Turner +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -69,9 +69,11 @@ + + #define SO_RXQ_OVFL 40 + ++#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.0/asoc-wm9712-fix-microphone-source-selection.patch b/queue-3.0/asoc-wm9712-fix-microphone-source-selection.patch new file mode 100644 index 00000000000..ce360140e23 --- /dev/null +++ b/queue-3.0/asoc-wm9712-fix-microphone-source-selection.patch @@ -0,0 +1,73 @@ +From ccf795847a38235ee4a56a24129ce75147d6ba8f Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Thu, 16 Aug 2012 22:36:04 +0100 +Subject: ASoC: wm9712: Fix microphone source selection + +From: Mark Brown + +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 +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -270,7 +270,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 = +@@ -289,7 +289,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), +@@ -317,6 +319,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"), +@@ -377,6 +380,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.0/series b/queue-3.0/series index 68496c1a90d..0395acbab0f 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -6,3 +6,8 @@ arm-7488-1-mm-use-5-bits-for-swapfile-type-encoding.patch arm-7489-1-errata-fix-workaround-for-erratum-720789-on-up-systems.patch arm-s3c24xx-fix-s3c2410_dma_enqueue-parameters.patch arm-imx-select-cpu_freq_table-when-needed.patch +asoc-wm9712-fix-microphone-source-selection.patch +vfs-missed-source-of-f_pos-races.patch +vfs-canonicalize-create-mode-in-build_open_flags.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.0/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch b/queue-3.0/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch new file mode 100644 index 00000000000..0d0fffcd59a --- /dev/null +++ b/queue-3.0/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch @@ -0,0 +1,39 @@ +From 43a34695d9cd79c6659f09da6d3b0624f3dd169f Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +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 + +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 +Reported-by: Bjørn Mork +CC: Pavel Machek +CC: Paul Gortmaker +CC: "John W. Linville" +CC: Eliad Peller +CC: Devendra Naga +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -24,7 +24,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.0/vfs-canonicalize-create-mode-in-build_open_flags.patch b/queue-3.0/vfs-canonicalize-create-mode-in-build_open_flags.patch new file mode 100644 index 00000000000..3e729282f68 --- /dev/null +++ b/queue-3.0/vfs-canonicalize-create-mode-in-build_open_flags.patch @@ -0,0 +1,41 @@ +From e68726ff72cf7ba5e7d789857fcd9a75ca573f03 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Wed, 15 Aug 2012 13:01:24 +0200 +Subject: vfs: canonicalize create mode in build_open_flags() + +From: Miklos Szeredi + +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 +Tested-by: Richard W.M. Jones +Signed-off-by: Greg Kroah-Hartman + +--- + fs/open.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/fs/open.c ++++ b/fs/open.c +@@ -900,9 +900,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.0/vfs-missed-source-of-f_pos-races.patch b/queue-3.0/vfs-missed-source-of-f_pos-races.patch new file mode 100644 index 00000000000..d3929d5152a --- /dev/null +++ b/queue-3.0/vfs-missed-source-of-f_pos-races.patch @@ -0,0 +1,54 @@ +From 0e665d5d1125f9f4ccff56a75e814f10f88861a2 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Mon, 20 Aug 2012 15:28:00 +0100 +Subject: vfs: missed source of ->f_pos races + +From: Al Viro + +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 +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/compat.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/fs/compat.c ++++ b/fs/compat.c +@@ -1177,11 +1177,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; + } +@@ -1236,11 +1239,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; + }