All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix sysrq-t free stack output
@ 2003-10-06 13:43 Russell King
  0 siblings, 0 replies; only message in thread
From: Russell King @ 2003-10-06 13:43 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel List

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@arm.linux.org.uk)	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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-06 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06 13:43 [PATCH] Fix sysrq-t free stack output Russell King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.