From: Greg Kroah-Hartman Date: Wed, 9 May 2012 18:32:46 +0000 (-0700) Subject: 3.3-stable patches X-Git-Tag: v3.3.6~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67d412936fcf768ce18b702704268724641e7727;p=thirdparty%2Fkernel%2Fstable-queue.git 3.3-stable patches added patches: arm-7410-1-add-extra-clobber-registers-for-assembly-in-kernel_execve.patch arm-7411-1-audit-fix-treatment-of-saved-ip-register-during-syscall-tracing.patch arm-7412-1-audit-use-only-audit_arch_arm-regardless-of-endianness.patch arm-7414-1-smp-prevent-use-of-the-console-when-using-idmap_pgd.patch asm-generic-use-__bits_per_long-in-statfs.h.patch asoc-core-check-of_property_count_strings-failure.patch asoc-tlv312aic23-unbreak-resume.patch drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch drm-i915-do-no-set-stencil-cache-eviction-lra-w-a-on-gen7.patch fix-__read_seqcount_begin-to-use-access_once-for-sequence-value-read.patch fs-cifs-fix-parsing-of-dfs-referrals.patch percpu-x86-don-t-use-pmd_size-as-embedded-atom_size-on-32bit.patch x86-relocs-remove-an-unused-variable.patch --- diff --git a/queue-3.3/arm-7410-1-add-extra-clobber-registers-for-assembly-in-kernel_execve.patch b/queue-3.3/arm-7410-1-add-extra-clobber-registers-for-assembly-in-kernel_execve.patch new file mode 100644 index 00000000000..4d2ecc3c9ac --- /dev/null +++ b/queue-3.3/arm-7410-1-add-extra-clobber-registers-for-assembly-in-kernel_execve.patch @@ -0,0 +1,40 @@ +From e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 Mon Sep 17 00:00:00 2001 +From: Tim Bird +Date: Wed, 2 May 2012 22:55:39 +0100 +Subject: ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve + +From: Tim Bird + +commit e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 upstream. + +The inline assembly in kernel_execve() uses r8 and r9. Since this +code sequence does not return, it usually doesn't matter if the +register clobber list is accurate. However, I saw a case where a +particular version of gcc used r8 as an intermediate for the value +eventually passed to r9. Because r8 is used in the inline +assembly, and not mentioned in the clobber list, r9 was set +to an incorrect value. + +This resulted in a kernel panic on execution of the first user-space +program in the system. r9 is used in ret_to_user as the thread_info +pointer, and if it's wrong, bad things happen. + +Signed-off-by: Tim Bird +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/sys_arm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/kernel/sys_arm.c ++++ b/arch/arm/kernel/sys_arm.c +@@ -115,7 +115,7 @@ int kernel_execve(const char *filename, + "Ir" (THREAD_START_SP - sizeof(regs)), + "r" (®s), + "Ir" (sizeof(regs)) +- : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); ++ : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory"); + + out: + return ret; diff --git a/queue-3.3/arm-7411-1-audit-fix-treatment-of-saved-ip-register-during-syscall-tracing.patch b/queue-3.3/arm-7411-1-audit-fix-treatment-of-saved-ip-register-during-syscall-tracing.patch new file mode 100644 index 00000000000..abfb61cc214 --- /dev/null +++ b/queue-3.3/arm-7411-1-audit-fix-treatment-of-saved-ip-register-during-syscall-tracing.patch @@ -0,0 +1,62 @@ +From 6a68b6f574c8ad2c1d90f0db8fd95b8abe8a0a73 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 4 May 2012 17:52:02 +0100 +Subject: ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing + +From: Will Deacon + +commit 6a68b6f574c8ad2c1d90f0db8fd95b8abe8a0a73 upstream. + +The ARM audit code incorrectly uses the saved application ip register +value to infer syscall entry or exit. Additionally, the saved value will +be clobbered if the current task is not being traced, which can lead to +libc corruption if ip is live (apparently glibc uses it for the TLS +pointer). + +This patch fixes the syscall tracing code so that the why parameter is +used to infer the syscall direction and the saved ip is only updated if +we know that we will be signalling a ptrace trap. + +Reported-and-Tested-by: Jon Masters + +Cc: Eric Paris +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/ptrace.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/arch/arm/kernel/ptrace.c ++++ b/arch/arm/kernel/ptrace.c +@@ -915,14 +915,7 @@ asmlinkage int syscall_trace(int why, st + { + unsigned long ip; + +- /* +- * Save IP. IP is used to denote syscall entry/exit: +- * IP = 0 -> entry, = 1 -> exit +- */ +- ip = regs->ARM_ip; +- regs->ARM_ip = why; +- +- if (!ip) ++ if (why) + audit_syscall_exit(regs); + else + audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, +@@ -935,6 +928,13 @@ asmlinkage int syscall_trace(int why, st + + current_thread_info()->syscall = scno; + ++ /* ++ * IP is used to denote syscall entry/exit: ++ * IP = 0 -> entry, =1 -> exit ++ */ ++ ip = regs->ARM_ip; ++ regs->ARM_ip = why; ++ + /* the 0x80 provides a way for the tracing parent to distinguish + between a syscall stop and SIGTRAP delivery */ + ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) diff --git a/queue-3.3/arm-7412-1-audit-use-only-audit_arch_arm-regardless-of-endianness.patch b/queue-3.3/arm-7412-1-audit-use-only-audit_arch_arm-regardless-of-endianness.patch new file mode 100644 index 00000000000..1a87ea68245 --- /dev/null +++ b/queue-3.3/arm-7412-1-audit-use-only-audit_arch_arm-regardless-of-endianness.patch @@ -0,0 +1,45 @@ +From 2f978366984a418f38fcf44137be1fbc5a89cfd9 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 4 May 2012 17:53:52 +0100 +Subject: ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness + +From: Will Deacon + +commit 2f978366984a418f38fcf44137be1fbc5a89cfd9 upstream. + +The machine endianness has no direct correspondence to the syscall ABI, +so use only AUDIT_ARCH_ARM when identifying the ABI to the audit tools +in userspace. + +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/ptrace.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +--- a/arch/arm/kernel/ptrace.c ++++ b/arch/arm/kernel/ptrace.c +@@ -905,12 +905,6 @@ long arch_ptrace(struct task_struct *chi + return ret; + } + +-#ifdef __ARMEB__ +-#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB +-#else +-#define AUDIT_ARCH_NR AUDIT_ARCH_ARM +-#endif +- + asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) + { + unsigned long ip; +@@ -918,7 +912,7 @@ asmlinkage int syscall_trace(int why, st + if (why) + audit_syscall_exit(regs); + else +- audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, ++ audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, + regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); + + if (!test_thread_flag(TIF_SYSCALL_TRACE)) diff --git a/queue-3.3/arm-7414-1-smp-prevent-use-of-the-console-when-using-idmap_pgd.patch b/queue-3.3/arm-7414-1-smp-prevent-use-of-the-console-when-using-idmap_pgd.patch new file mode 100644 index 00000000000..c1623ab060e --- /dev/null +++ b/queue-3.3/arm-7414-1-smp-prevent-use-of-the-console-when-using-idmap_pgd.patch @@ -0,0 +1,55 @@ +From fde165b2a29673aabf18ceff14dea1f1cfb0daad Mon Sep 17 00:00:00 2001 +From: Colin Cross +Date: Sat, 5 May 2012 20:58:13 +0100 +Subject: ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd + +From: Colin Cross + +commit fde165b2a29673aabf18ceff14dea1f1cfb0daad upstream. + +Commit 4e8ee7de227e3ab9a72040b448ad728c5428a042 (ARM: SMP: use +idmap_pgd for mapping MMU enable during secondary booting) +switched secondary boot to use idmap_pgd, which is initialized +during early_initcall, instead of a page table initialized during +__cpu_up. This causes idmap_pgd to contain the static mappings +but be missing all dynamic mappings. + +If a console is registered that creates a dynamic mapping, the +printk in secondary_start_kernel will trigger a data abort on +the missing mapping before the exception handlers have been +initialized, leading to a hang. Initial boot is not affected +because no consoles have been registered, and resume is usually +not affected because the offending console is suspended. +Onlining a cpu with hotplug triggers the problem. + +A workaround is to the printk in secondary_start_kernel until +after the page tables have been switched back to init_mm. + +Signed-off-by: Colin Cross +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/smp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/kernel/smp.c ++++ b/arch/arm/kernel/smp.c +@@ -255,8 +255,6 @@ asmlinkage void __cpuinit secondary_star + struct mm_struct *mm = &init_mm; + unsigned int cpu = smp_processor_id(); + +- printk("CPU%u: Booted secondary processor\n", cpu); +- + /* + * All kernel threads share the same mm context; grab a + * reference and switch to it. +@@ -268,6 +266,8 @@ asmlinkage void __cpuinit secondary_star + enter_lazy_tlb(mm, current); + local_flush_tlb_all(); + ++ printk("CPU%u: Booted secondary processor\n", cpu); ++ + cpu_init(); + preempt_disable(); + trace_hardirqs_off(); diff --git a/queue-3.3/asm-generic-use-__bits_per_long-in-statfs.h.patch b/queue-3.3/asm-generic-use-__bits_per_long-in-statfs.h.patch new file mode 100644 index 00000000000..fb08474052c --- /dev/null +++ b/queue-3.3/asm-generic-use-__bits_per_long-in-statfs.h.patch @@ -0,0 +1,35 @@ +From f5c2347ee20a8d6964d6a6b1ad04f200f8d4dfa7 Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin" +Date: Thu, 26 Apr 2012 11:45:16 -0700 +Subject: asm-generic: Use __BITS_PER_LONG in statfs.h + +From: "H. Peter Anvin" + +commit f5c2347ee20a8d6964d6a6b1ad04f200f8d4dfa7 upstream. + + is exported to userspace, so using +BITS_PER_LONG is invalid. We need to use __BITS_PER_LONG instead. + +This is kernel bugzilla 43165. + +Reported-by: H.J. Lu +Signed-off-by: H. Peter Anvin +Link: http://lkml.kernel.org/r/1335465916-16965-1-git-send-email-hpa@linux.intel.com +Acked-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + include/asm-generic/statfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/asm-generic/statfs.h ++++ b/include/asm-generic/statfs.h +@@ -15,7 +15,7 @@ typedef __kernel_fsid_t fsid_t; + * with a 10' pole. + */ + #ifndef __statfs_word +-#if BITS_PER_LONG == 64 ++#if __BITS_PER_LONG == 64 + #define __statfs_word long + #else + #define __statfs_word __u32 diff --git a/queue-3.3/asoc-core-check-of_property_count_strings-failure.patch b/queue-3.3/asoc-core-check-of_property_count_strings-failure.patch new file mode 100644 index 00000000000..7a79201eeb3 --- /dev/null +++ b/queue-3.3/asoc-core-check-of_property_count_strings-failure.patch @@ -0,0 +1,33 @@ +From c34ce320d9fe328e3272def20b152f39ccfa045e Mon Sep 17 00:00:00 2001 +From: Richard Zhao +Date: Tue, 24 Apr 2012 15:24:43 +0800 +Subject: ASoC: core: check of_property_count_strings failure + +From: Richard Zhao + +commit c34ce320d9fe328e3272def20b152f39ccfa045e upstream. + +Signed-off-by: Richard Zhao +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-core.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/soc/soc-core.c ++++ b/sound/soc/soc-core.c +@@ -3420,10 +3420,10 @@ int snd_soc_of_parse_audio_routing(struc + int i, ret; + + num_routes = of_property_count_strings(np, propname); +- if (num_routes & 1) { ++ if (num_routes < 0 || num_routes & 1) { + dev_err(card->dev, +- "Property '%s's length is not even\n", +- propname); ++ "Property '%s' does not exist or its length is not even\n", ++ propname); + return -EINVAL; + } + num_routes /= 2; diff --git a/queue-3.3/asoc-tlv312aic23-unbreak-resume.patch b/queue-3.3/asoc-tlv312aic23-unbreak-resume.patch new file mode 100644 index 00000000000..da8df01c0cd --- /dev/null +++ b/queue-3.3/asoc-tlv312aic23-unbreak-resume.patch @@ -0,0 +1,49 @@ +From e875c1e3e758447ba81ca450d89434b3b0496d37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eric=20B=C3=A9nard?= +Date: Sun, 29 Apr 2012 17:37:57 +0200 +Subject: ASoC: tlv312aic23: unbreak resume +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Eric Bénard + +commit e875c1e3e758447ba81ca450d89434b3b0496d37 upstream. + +* commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to +a bug preventing resumeof the codec as regmap expects a 9 bits data +register but 0xFFFF is passed in tlv320aic23_set_bias_level and this +values gets cached preventing any write to the TLV320AIC23_PWR +register as the final value produced by regmap is (register << 9) | value + +* this patch solves the problem by only working on the 9 bits the +register contains. + +Signed-off-by: Eric Bénard +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/tlv320aic23.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/tlv320aic23.c ++++ b/sound/soc/codecs/tlv320aic23.c +@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(st + static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, + enum snd_soc_bias_level level) + { +- u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f; ++ u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f; + + switch (level) { + case SND_SOC_BIAS_ON: +@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(st + case SND_SOC_BIAS_OFF: + /* everything off, dac mute, inactive */ + snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); +- snd_soc_write(codec, TLV320AIC23_PWR, 0xffff); ++ snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff); + break; + } + codec->dapm.bias_level = level; diff --git a/queue-3.3/drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch b/queue-3.3/drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch new file mode 100644 index 00000000000..f30db5b71fb --- /dev/null +++ b/queue-3.3/drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch @@ -0,0 +1,54 @@ +From 768b107e4b3be0acf6f58e914afe4f337c00932b Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Fri, 4 May 2012 11:29:56 +0200 +Subject: drm/i915: disable sdvo hotplug on i945g/gm +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Daniel Vetter + +commit 768b107e4b3be0acf6f58e914afe4f337c00932b upstream. + +Chris Wilson dug out a hw erratum saying that there's noise on the +interrupt line on i945G chips. We also have a bug report from a i945GM +chip with an sdvo hotplug interrupt storm (and no apparent cause). + +Play it safe and disable sdvo hotplug on all i945 variants. + +Note that this is a regression that has been introduced in 3.1, +when we've enabled sdvo hotplug support with + +commit cc68c81aed7d892deaf12d720d5455208e94cd0a +Author: Simon Farnsworth +Date: Wed Sep 21 17:13:30 2011 +0100 + + drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442 +Reported-and-tested-by: Dominik Köppl +Reviewed-by: Chris Wilson +Signed-Off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_sdvo.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_sdvo.c ++++ b/drivers/gpu/drm/i915/intel_sdvo.c +@@ -1221,8 +1221,14 @@ static bool intel_sdvo_get_capabilities( + + static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo) + { ++ struct drm_device *dev = intel_sdvo->base.base.dev; + u8 response[2]; + ++ /* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise ++ * on the line. */ ++ if (IS_I945G(dev) || IS_I945GM(dev)) ++ return false; ++ + return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, + &response, 2) && response[0]; + } diff --git a/queue-3.3/drm-i915-do-no-set-stencil-cache-eviction-lra-w-a-on-gen7.patch b/queue-3.3/drm-i915-do-no-set-stencil-cache-eviction-lra-w-a-on-gen7.patch new file mode 100644 index 00000000000..d08e8725c75 --- /dev/null +++ b/queue-3.3/drm-i915-do-no-set-stencil-cache-eviction-lra-w-a-on-gen7.patch @@ -0,0 +1,48 @@ +From 2e7a44814d802c8ba479164b8924070cd908d6b5 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Sun, 6 May 2012 16:50:24 +0200 +Subject: drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+ + +From: Daniel Vetter + +commit 2e7a44814d802c8ba479164b8924070cd908d6b5 upstream. + +I've flagged this while reviewing the first version and Ken Graunke +fixed it up in v2, but unfortunately Dave Airlie picked up the wrong +version. + +Cc: Dave Airlie +Cc: Kenneth Graunke +Signed-Off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -414,10 +414,8 @@ static int init_render_ring(struct intel + return ret; + } + +- if (INTEL_INFO(dev)->gen >= 6) { +- I915_WRITE(INSTPM, +- INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); + ++ if (IS_GEN6(dev)) { + /* From the Sandybridge PRM, volume 1 part 3, page 24: + * "If this bit is set, STCunit will have LRA as replacement + * policy. [...] This bit must be reset. LRA replacement +@@ -427,6 +425,11 @@ static int init_render_ring(struct intel + CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); + } + ++ if (INTEL_INFO(dev)->gen >= 6) { ++ I915_WRITE(INSTPM, ++ INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); ++ } ++ + return ret; + } + diff --git a/queue-3.3/fix-__read_seqcount_begin-to-use-access_once-for-sequence-value-read.patch b/queue-3.3/fix-__read_seqcount_begin-to-use-access_once-for-sequence-value-read.patch new file mode 100644 index 00000000000..760076af7ad --- /dev/null +++ b/queue-3.3/fix-__read_seqcount_begin-to-use-access_once-for-sequence-value-read.patch @@ -0,0 +1,48 @@ +From 2f624278626677bfaf73fef97f86b37981621f5c Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Fri, 4 May 2012 14:46:02 -0700 +Subject: Fix __read_seqcount_begin() to use ACCESS_ONCE for sequence value read + +From: Linus Torvalds + +commit 2f624278626677bfaf73fef97f86b37981621f5c upstream. + +We really need to use a ACCESS_ONCE() on the sequence value read in +__read_seqcount_begin(), because otherwise the compiler might end up +reloading the value in between the test and the return of it. As a +result, it might end up returning an odd value (which means that a write +is in progress). + +If the reader is then fast enough that that odd value is still the +current one when the read_seqcount_retry() is done, we might end up with +a "successful" read sequence, even despite the concurrent write being +active. + +In practice this probably never really happens - there just isn't +anything else going on around the read of the sequence count, and the +common case is that we end up having a read barrier immediately +afterwards. + +So the code sequence in which gcc might decide to reaload from memory is +small, and there's no reason to believe it would ever actually do the +reload. But if the compiler ever were to decide to do so, it would be +incredibly annoying to debug. Let's just make sure. + +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/seqlock.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/seqlock.h ++++ b/include/linux/seqlock.h +@@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_b + unsigned ret; + + repeat: +- ret = s->sequence; ++ ret = ACCESS_ONCE(s->sequence); + if (unlikely(ret & 1)) { + cpu_relax(); + goto repeat; diff --git a/queue-3.3/fs-cifs-fix-parsing-of-dfs-referrals.patch b/queue-3.3/fs-cifs-fix-parsing-of-dfs-referrals.patch new file mode 100644 index 00000000000..85427d265a0 --- /dev/null +++ b/queue-3.3/fs-cifs-fix-parsing-of-dfs-referrals.patch @@ -0,0 +1,46 @@ +From d8f2799b105a24bb0bbd3380a0d56e6348484058 Mon Sep 17 00:00:00 2001 +From: Stefan Metzmacher +Date: Fri, 4 May 2012 00:19:28 +0200 +Subject: fs/cifs: fix parsing of dfs referrals +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Stefan Metzmacher + +commit d8f2799b105a24bb0bbd3380a0d56e6348484058 upstream. + +The problem was that the first referral was parsed more than once +and so the caller tried the same referrals multiple times. + +The problem was introduced partly by commit +066ce6899484d9026acd6ba3a8dbbedb33d7ae1b, +where 'ref += le16_to_cpu(ref->Size);' got lost, +but that was also wrong... + +Signed-off-by: Stefan Metzmacher +Tested-by: Björn Jacke +Reviewed-by: Jeff Layton +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman + +--- + fs/cifs/cifssmb.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/fs/cifs/cifssmb.c ++++ b/fs/cifs/cifssmb.c +@@ -4831,8 +4831,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS + max_len = data_end - temp; + node->node_name = cifs_strndup_from_utf16(temp, max_len, + is_unicode, nls_codepage); +- if (!node->node_name) ++ if (!node->node_name) { + rc = -ENOMEM; ++ goto parse_DFS_referrals_exit; ++ } ++ ++ ref++; + } + + parse_DFS_referrals_exit: diff --git a/queue-3.3/percpu-x86-don-t-use-pmd_size-as-embedded-atom_size-on-32bit.patch b/queue-3.3/percpu-x86-don-t-use-pmd_size-as-embedded-atom_size-on-32bit.patch new file mode 100644 index 00000000000..9261d2956a0 --- /dev/null +++ b/queue-3.3/percpu-x86-don-t-use-pmd_size-as-embedded-atom_size-on-32bit.patch @@ -0,0 +1,65 @@ +From d5e28005a1d2e67833852f4c9ea8ec206ea3ff85 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Fri, 27 Apr 2012 10:54:35 -0700 +Subject: percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit + +From: Tejun Heo + +commit d5e28005a1d2e67833852f4c9ea8ec206ea3ff85 upstream. + +With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE +or PMD_SIZE for atom_size. PMD_SIZE is used when CPU supports PSE so +that percpu areas are aligned to PMD mappings and possibly allow using +PMD mappings in vmalloc areas in the future. Using larger atom_size +doesn't waste actual memory; however, it does require larger vmalloc +space allocation later on for !first chunks. + +With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem +but x86_32 at this point is anything but reasonable in terms of +address space and using larger atom_size reportedly leads to frequent +percpu allocation failures on certain setups. + +As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space +is aplenty and most x86_64 configurations support PSE, fix the issue +by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32. + +v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and + x86_32 PAGE_SIZE as suggested by hpa. + +Signed-off-by: Tejun Heo +Reported-by: Yanmin Zhang +Reported-by: ShuoX Liu +Acked-by: H. Peter Anvin +LKML-Reference: <4F97BA98.6010001@intel.com> +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/setup_percpu.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +--- a/arch/x86/kernel/setup_percpu.c ++++ b/arch/x86/kernel/setup_percpu.c +@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void) + #endif + rc = -EINVAL; + if (pcpu_chosen_fc != PCPU_FC_PAGE) { +- const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE; + const size_t dyn_size = PERCPU_MODULE_RESERVE + + PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE; ++ size_t atom_size; + ++ /* ++ * On 64bit, use PMD_SIZE for atom_size so that embedded ++ * percpu areas are aligned to PMD. This, in the future, ++ * can also allow using PMD mappings in vmalloc area. Use ++ * PAGE_SIZE on 32bit as vmalloc space is highly contended ++ * and large vmalloc area allocs can easily fail. ++ */ ++#ifdef CONFIG_X86_64 ++ atom_size = PMD_SIZE; ++#else ++ atom_size = PAGE_SIZE; ++#endif + rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, + dyn_size, atom_size, + pcpu_cpu_distance, diff --git a/queue-3.3/series b/queue-3.3/series index 1deaefad6ae..afb364668f4 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -3,3 +3,16 @@ smsc95xx-mark-link-down-on-startup-and-let-phy-interrupt.patch e1000-fix-vlan-processing-regression.patch xen-pte-fix-crashes-when-trying-to-see-non-existent-pgd-pmd-pud-ptes.patch xen-pci-don-t-use-pci-bios-service-for-configuration-space-accesses.patch +drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch +drm-i915-do-no-set-stencil-cache-eviction-lra-w-a-on-gen7.patch +asoc-core-check-of_property_count_strings-failure.patch +asoc-tlv312aic23-unbreak-resume.patch +fs-cifs-fix-parsing-of-dfs-referrals.patch +x86-relocs-remove-an-unused-variable.patch +percpu-x86-don-t-use-pmd_size-as-embedded-atom_size-on-32bit.patch +asm-generic-use-__bits_per_long-in-statfs.h.patch +fix-__read_seqcount_begin-to-use-access_once-for-sequence-value-read.patch +arm-7410-1-add-extra-clobber-registers-for-assembly-in-kernel_execve.patch +arm-7411-1-audit-fix-treatment-of-saved-ip-register-during-syscall-tracing.patch +arm-7412-1-audit-use-only-audit_arch_arm-regardless-of-endianness.patch +arm-7414-1-smp-prevent-use-of-the-console-when-using-idmap_pgd.patch diff --git a/queue-3.3/x86-relocs-remove-an-unused-variable.patch b/queue-3.3/x86-relocs-remove-an-unused-variable.patch new file mode 100644 index 00000000000..e87f93876eb --- /dev/null +++ b/queue-3.3/x86-relocs-remove-an-unused-variable.patch @@ -0,0 +1,39 @@ +From 7c77cda0fe742ed07622827ce80963bbeebd1e3f Mon Sep 17 00:00:00 2001 +From: Kusanagi Kouichi +Date: Sun, 1 Apr 2012 17:29:32 +0900 +Subject: x86, relocs: Remove an unused variable + +From: Kusanagi Kouichi + +commit 7c77cda0fe742ed07622827ce80963bbeebd1e3f upstream. + +sh_symtab is set but not used. + +[ hpa: putting this in urgent because of the sheer harmlessness of the patch: + it quiets a build warning but does not change any generated code. ] + +Signed-off-by: Kusanagi Kouichi +Link: http://lkml.kernel.org/r/20120401082932.D5E066FC03D@msa105.auone-net.jp +Signed-off-by: H. Peter Anvin +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/boot/compressed/relocs.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/arch/x86/boot/compressed/relocs.c ++++ b/arch/x86/boot/compressed/relocs.c +@@ -402,13 +402,11 @@ static void print_absolute_symbols(void) + for (i = 0; i < ehdr.e_shnum; i++) { + struct section *sec = &secs[i]; + char *sym_strtab; +- Elf32_Sym *sh_symtab; + int j; + + if (sec->shdr.sh_type != SHT_SYMTAB) { + continue; + } +- sh_symtab = sec->symtab; + sym_strtab = sec->link->strtab; + for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) { + Elf32_Sym *sym;