[parisc-linux-cvs] linux-2.6 tausq

Randolph Chung randolph at tausq.org
Thu Aug 19 17:46:51 MDT 2004


> 	.              : Makefile 
> 	arch/parisc/kernel: unwind.c 
> 
> Log message:
> 2.6.8.1-pa6
> 
> /* FIXME: what happens if we unwind too far so that
> sp no longer falls in a mapped kernel page? */
> 
> well, it crashes, silly!  fix it...


Index: arch/parisc/kernel/unwind.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/unwind.c,v
retrieving revision 1.7
diff -u -p -r1.7 unwind.c
--- arch/parisc/kernel/unwind.c	13 Aug 2004 16:32:54 -0000	1.7
+++ arch/parisc/kernel/unwind.c	19 Aug 2004 22:48:34 -0000
@@ -221,16 +221,13 @@ static void unwind_frame_regs(struct unw
 		   modules. */
 		sp = info->sp & ~63;
 		do {
-			info->prev_sp = sp - 64;
-
-			/* FIXME: what happens if we unwind too far so that 
-			   sp no longer falls in a mapped kernel page? */
-#ifndef __LP64__
-			info->prev_ip = *(unsigned long *)(info->prev_sp - 20);
-#else
-			info->prev_ip = *(unsigned long *)(info->prev_sp - 16);
-#endif
+			unsigned long tmp;
 
+			info->prev_sp = sp - 64;
+			info->prev_ip = 0;
+			if (get_user(tmp, (unsigned long *)(info->prev_sp - RP_OFFSET))) 
+				break;
+			info->prev_ip = tmp;
 			sp = info->prev_sp;
 		} while (info->prev_ip < (unsigned long)_stext ||
 			 info->prev_ip > (unsigned long)_etext);


More information about the parisc-linux-cvs mailing list