Messages in this thread Patch in this message | | | From | Mitsuo Hayasaka <> | Subject | [RFC PATCH 5/5] x86: change range of stack overflow checking | Date | Mon, 07 Nov 2011 14:53:16 +0900 |
| |
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,
| |