lkml.org 
[lkml]   [2011]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 5/5] x86: change range of stack overflow checking
Date
The original stack overflow checking checks if a stack pointer is
less than or equal to (curbase + THREAD_SIZE) as the 2nd condition.
However, it is not necessary since the 3rd one checks if the pointer
is lower than available stack size. This patch removes the 2nd one.

Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---

arch/x86/kernel/irq_64.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
index f7baedd..d85b338 100644
--- a/arch/x86/kernel/irq_64.c
+++ b/arch/x86/kernel/irq_64.c
@@ -73,7 +73,6 @@ static inline void stack_overflow_check(struct pt_regs *regs)
panic("low stack detected by irq handler - check messages\n");
#else
if (regs->sp >= curbase &&
- regs->sp <= curbase + THREAD_SIZE &&
regs->sp < curbase + sizeof(struct thread_info) +
sizeof(struct pt_regs) + 128) {
WARN_ONCE(1,


\
 
 \ /
  Last update: 2011-11-07 06:51    [W:0.170 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site