[PATCH] Fix sysrq-t free stack output

From: Russell King
Date: Mon Oct 06 2003 - 08:47:20 EST


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.

--- orig/kernel/sched.c Sun Sep 28 09:55:57 2003
+++ linux/kernel/sched.c Mon Oct 6 14:40:37 2003
@@ -2465,7 +2465,7 @@
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)))

--
Russell King (rmk@xxxxxxxxxxxxxxxx) http://www.arm.linux.org.uk/personal/
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/