The NMI entry and exit code fiddles with bits in the preempt count. If
an NMI happens while some other code is doing the same, bits will be
lost. This patch removes this modify code from the NMI path till we can
come up with something better.
--
George Anzinger [email protected]
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/
Source: MontaVista Software, Inc. George Anzinger <[email protected]>
Type: Defect Fix
Description:
Modifying a word from NMI code runs the very real risk of loosing
either then new or the old bits. Remember, we can not prevent an
NMI interrupt from ANYWHERE, inparticular between the read and the
write of a read modify write sequence.
This patch removes the update of the preempt count from the NMI
path.
Signed-off-by: George Anzinger<[email protected]>
hardirq.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Index: linux-2.6.13-rc/include/linux/hardirq.h
===================================================================
--- linux-2.6.13-rc.orig/include/linux/hardirq.h
+++ linux-2.6.13-rc/include/linux/hardirq.h
@@ -98,9 +98,12 @@ extern void synchronize_irq(unsigned int
#else
# define synchronize_irq(irq) barrier()
#endif
-
-#define nmi_enter() irq_enter()
-#define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET)
+/*
+ * Re think these. NMI _must_not_ share data words with non-nmi code
+ * Meanwhile, just do a no-op.
+ */
+#define nmi_enter() /* irq_enter() */
+#define nmi_exit() /* sub_preempt_count(HARDIRQ_OFFSET) */
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
static inline void account_user_vtime(struct task_struct *tsk)
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|