Commit 6fd0e105 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] m68k 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 8e9b32e7
...@@ -399,7 +399,7 @@ unsigned long get_wchan(struct task_struct *p) ...@@ -399,7 +399,7 @@ unsigned long get_wchan(struct task_struct *p)
stack_page = (unsigned long)(p->thread_info); stack_page = (unsigned long)(p->thread_info);
fp = ((struct switch_stack *)p->thread.ksp)->a6; fp = ((struct switch_stack *)p->thread.ksp)->a6;
do { do {
if (fp < stack_page+sizeof(struct task_struct) || if (fp < stack_page+sizeof(struct thread_info) ||
fp >= 8184+stack_page) fp >= 8184+stack_page)
return 0; return 0;
pc = ((unsigned long *)fp)[1]; pc = ((unsigned long *)fp)[1];
......
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