Commit 2901f6ba authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sparc32 stack bounds checking

From: William Lee Irwin III <wli@holomorphy.com>

The stack is now shared with struct thread_info on most arches, not task_t.
This mostly affects get_wchan() and stack usage debug.
parent 7bad0e6d
......@@ -324,7 +324,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
fp = (unsigned long) _ksp;
do {
/* Bogus frame pointer? */
if (fp < (task_base + sizeof(struct task_struct)) ||
if (fp < (task_base + sizeof(struct thread_info)) ||
fp >= (task_base + (PAGE_SIZE << 1)))
break;
rw = (struct reg_window *) fp;
......@@ -716,7 +716,7 @@ unsigned long get_wchan(struct task_struct *task)
fp = task->thread_info->ksp + bias;
do {
/* Bogus frame pointer? */
if (fp < (task_base + sizeof(struct task_struct)) ||
if (fp < (task_base + sizeof(struct thread_info)) ||
fp >= (task_base + (2 * PAGE_SIZE)))
break;
rw = (struct reg_window *) fp;
......
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