Commit 4a369121 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] stack overflow checking fix

Patch from William Lee Irwin III <wli@holomorphy.com>

struct thread_info is shared with the stack, not struct task_struct.
False positives have been seen.
parent 055939f7
......@@ -338,9 +338,9 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
__asm__ __volatile__("andl %%esp,%0" :
"=r" (esp) : "0" (8191));
if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
if (unlikely(esp < (sizeof(struct thread_info) + 1024))) {
printk("do_IRQ: stack overflow: %ld\n",
esp - sizeof(struct task_struct));
esp - sizeof(struct thread_info));
dump_stack();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment