Fix bug added in 2.6.34.6-53

This commit is contained in:
Chuck Ebbert 2010-09-14 22:08:50 -04:00
parent f63cfaf93a
commit dfcfe74aa7
2 changed files with 38 additions and 1 deletions

View File

@ -792,7 +792,10 @@ Patch12523: keys-fix-rcu-no-lock-warning-in-keyctl-session-to-parent.patch
Patch12530: pci-msi-remove-unsafe-and-unnecessary-hardware-access.patch
Patch12531: pci-msi-restore-read_msi_msg_desc-add-get_cached_msi_msg_desc.patch
Patch12532: x86-tsc-sched-recompute-cyc2ns_offset-s-during-resume-from-sleep-states.patch
# fix bug caused by above patch
Patch12533: x86-tsc-fix-a-preemption-leak-in-restore_sched_clock_state.patch
# Mitigate DOS with large argument lists.
Patch12540: execve-improve-interactivity-with-large-arguments.patch
@ -1502,6 +1505,8 @@ ApplyPatch pci-msi-remove-unsafe-and-unnecessary-hardware-access.patch
ApplyPatch pci-msi-restore-read_msi_msg_desc-add-get_cached_msi_msg_desc.patch
# Fix scheduler load balancing after suspend/resume cycle
ApplyPatch x86-tsc-sched-recompute-cyc2ns_offset-s-during-resume-from-sleep-states.patch
# fix bug caused by above patch
ApplyPatch x86-tsc-fix-a-preemption-leak-in-restore_sched_clock_state.patch
# Mitigate DOS with large argument lists.
ApplyPatch execve-improve-interactivity-with-large-arguments.patch
@ -2130,6 +2135,9 @@ fi
%changelog
* Tue Sep 14 2010 Chuck Ebbert <cebbert@redhat.com> 2.6.34.7-57
- Fix bug added in 2.6.34.6-53
* Tue Sep 14 2010 Chuck Ebbert <cebbert@redhat.com>
- Mitigate DOS with large argument lists.
* Tue Sep 14 2010 Kyle McMartin <kyle@redhat.com>
@ -2138,7 +2146,7 @@ fi
- aio: check for multiplication overflow in do_io_submit. (CVE-2010-3067)
* Tue Sep 14 2010 Chuck Ebbert <cebbert@redhat.com> 2.6.34.7-56
- Linux 2.6.34.7
- Linux 2.6.34.7, should fix multiple USB HID device issues.
* Mon Sep 13 2010 Ben Skeggs <bskeggs@redhat.com> 2.6.34.6-55
- nouveau: fix oops in acpi edid support (rhbz#613284)

View File

@ -0,0 +1,29 @@
From: Peter Zijlstra <peterz@infradead.org>
Date: Fri, 10 Sep 2010 20:32:53 +0000 (+0200)
Subject: x86, tsc: Fix a preemption leak in restore_sched_clock_state()
X-Git-Tag: v2.6.36-rc4~11
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5ee5e97ee9bca919af11c562beeaf61741ad33f1
x86, tsc: Fix a preemption leak in restore_sched_clock_state()
A real life genuine preemption leak..
Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index d632934..26a863a 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -655,7 +655,7 @@ void restore_sched_clock_state(void)
local_irq_save(flags);
- get_cpu_var(cyc2ns_offset) = 0;
+ __get_cpu_var(cyc2ns_offset) = 0;
offset = cyc2ns_suspend - sched_clock();
for_each_possible_cpu(cpu)