From: Andrew Morton Date: Mon, 19 Apr 2004 05:07:08 +0000 (-0700) Subject: [PATCH] m68knommu stack bounds checking X-Git-Tag: v2.6.6-rc2~18^2^2~4 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=34f77ac0dde78c5cdcbb4d80bd4d02e64166e907;p=history.git [PATCH] m68knommu stack bounds checking From: William Lee Irwin III The stack is now shared with struct thread_info on most arches, not task_t. This mostly affects get_wchan() and stack usage debug. --- diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 835e3004822d..6d9f428ef7a4 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -421,7 +421,7 @@ unsigned long get_wchan(struct task_struct *p) stack_page = (unsigned long)p; fp = ((struct switch_stack *)p->thread.ksp)->a6; do { - if (fp < stack_page+sizeof(struct task_struct) || + if (fp < stack_page+sizeof(struct thread_info) || fp >= 8184+stack_page) return 0; pc = ((unsigned long *)fp)[1];