]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix sysrq-t free stack output
authorRussell King <rmk@arm.linux.org.uk>
Mon, 6 Oct 2003 01:18:43 +0000 (18:18 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 6 Oct 2003 01:18:43 +0000 (18:18 -0700)
It seems that we're attempting to work out the free stack size using two
unrelated pointers for the lowest address of the stack.  Fix this to use
the correct pointer.

kernel/sched.c

index d7525795504764ecd28c81bd90411a89e94f316e..b6fef55f7e3a9d2b76641f611fd75dcfdecb0573 100644 (file)
@@ -2465,7 +2465,7 @@ static void show_task(task_t * p)
                unsigned long * n = (unsigned long *) (p->thread_info+1);
                while (!*n)
                        n++;
-               free = (unsigned long) n - (unsigned long)(p+1);
+               free = (unsigned long) n - (unsigned long)(p->thread_info+1);
        }
        printk("%5lu %5d %6d ", free, p->pid, p->parent->pid);
        if ((relative = eldest_child(p)))