rhbz#710921: revert-ftrace-remove-unnecessary-disabling-of-irqs.patch

This commit is contained in:
Kyle McMartin 2011-06-09 10:25:34 -04:00
parent 99b6793a5d
commit 490bb4b273
2 changed files with 45 additions and 1 deletions

View File

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 1
%global baserelease 2
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -717,6 +717,8 @@ Patch12401: mm-slub-do-not-wake-kswapd-for-slubs-speculative-high-order-allocati
Patch12402: mm-slub-do-not-take-expensive-steps-for-slubs-speculative-high-order-allocations.patch
Patch12403: mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
Patch12404: revert-ftrace-remove-unnecessary-disabling-of-irqs.patch
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@ -1323,6 +1325,9 @@ ApplyPatch mm-slub-do-not-wake-kswapd-for-slubs-speculative-high-order-allocatio
ApplyPatch mm-slub-do-not-take-expensive-steps-for-slubs-speculative-high-order-allocations.patch
ApplyPatch mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
# rhbz#710921
ApplyPatch revert-ftrace-remove-unnecessary-disabling-of-irqs.patch
# END OF PATCH APPLICATIONS
%endif
@ -1931,6 +1936,9 @@ fi
# and build.
%changelog
* Thu Jun 09 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc2.git0.2
- rhbz#710921: revert-ftrace-remove-unnecessary-disabling-of-irqs.patch
* Wed Jun 08 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc2.git0.1
- Update to 3.0-rc2, rebase utsname fix.
- Build IPv6 into the kernel for a variety of reasons

View File

@ -0,0 +1,36 @@
From 2735da6316af256e62d5f6c15ffa451182734bc3 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@mcmartin.ca>
Date: Thu, 9 Jun 2011 10:19:15 -0400
Subject: Revert "ftrace: Remove unnecessary disabling of irqs"
This reverts commit 8ab2b7efd3e2ccf2c2dda3206b8171ecdbd0af40.
---
kernel/trace/ftrace.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1ee417f..a75432a 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3330,6 +3330,7 @@ static int ftrace_process_locs(struct module *mod,
{
unsigned long *p;
unsigned long addr;
+ unsigned long flags;
mutex_lock(&ftrace_lock);
p = start;
@@ -3346,7 +3347,10 @@ static int ftrace_process_locs(struct module *mod,
ftrace_record_ip(addr);
}
+ /* disable interrupts to prevent kstop machine */
+ local_irq_save(flags);
ftrace_update_code(mod);
+ local_irq_restore(flags);
mutex_unlock(&ftrace_lock);
return 0;
--
1.7.5.2