]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] h8300 stack bounds checking
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Apr 2004 05:06:44 +0000 (22:06 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 19 Apr 2004 05:06:44 +0000 (22:06 -0700)
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.

arch/h8300/kernel/process.c

index 8640ea20dba0e9a85caa20b6806a80ace2f031f4..afe7417c02c85b57e66fcf38afe69a906b5a36f2 100644 (file)
@@ -283,7 +283,7 @@ unsigned long get_wchan(struct task_struct *p)
        stack_page = (unsigned long)p;
        fp = ((struct pt_regs *)p->thread.ksp)->er6;
        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];