patch-2.1.120 linux/fs/proc/array.c

Next file: linux/fs/qnx4/BUGS
Previous file: linux/fs/nfsd/nfsfh.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.119/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -530,14 +530,12 @@
 	    unsigned long fp, pc;
 	    unsigned long stack_page;
 	    int count = 0;
-	    extern int sys_pause (void);
 
-	    stack_page = p->kernel_stack_page;
-	    if (!stack_page)
-		    return 0;
+	    stack_page = (unsigned long)p;
 	    fp = ((struct switch_stack *)p->tss.ksp)->a6;
 	    do {
-		    if (fp < stack_page || fp >= 4088+stack_page)
+		    if (fp < stack_page+sizeof(struct task_struct) ||
+			fp >= 8184+stack_page)
 			    return 0;
 		    pc = ((unsigned long *)fp)[1];
 		/* FIXME: This depends on the order of these functions. */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov