Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=690def21414fa43fac1b8053fd952c0366c476de
Commit:     690def21414fa43fac1b8053fd952c0366c476de
Parent:     3be44b9cc33d26930cb3bb014f35f582c6522481
Author:     Kirill Korotaev <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 19 14:04:20 2007 +0300
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Tue May 8 14:51:42 2007 -0700

    [IA64] unwind did not work for processes born with CLONE_STOPPED
    
    Minor problem for mainstream. Big problem for checkpoint/restore,
    because all the stopped/traced processes are born in this state,
    hence they cannot be checkpointed again due to failing unwind.
    
    The problem was identified as assumption in kernel unwind library
    that top level frame is different of syscall frame. It is the case
    unless process was born with CLONE_STOPPED.
    
    Author: Alexey Kuznetsov <[EMAIL PROTECTED]>
    Signed-Off-By: Alexey Kuznetsov <[EMAIL PROTECTED]>
    Signed-Off-By: Kirill Korotaev <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/unwind.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index e3be21c..fe14262 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -60,6 +60,7 @@
 #  define UNW_DEBUG_ON(n)      unw_debug_level >= n
    /* Do not code a printk level, not all debug lines end in newline */
 #  define UNW_DPRINT(n, ...)  if (UNW_DEBUG_ON(n)) printk(__VA_ARGS__)
+#  undef inline
 #  define inline
 #else /* !UNW_DEBUG */
 #  define UNW_DEBUG_ON(n)  0
@@ -1943,9 +1944,9 @@ EXPORT_SYMBOL(unw_unwind);
 int
 unw_unwind_to_user (struct unw_frame_info *info)
 {
-       unsigned long ip, sp, pr = 0;
+       unsigned long ip, sp, pr = info->pr;
 
-       while (unw_unwind(info) >= 0) {
+       do {
                unw_get_sp(info, &sp);
                if ((long)((unsigned long)info->task + IA64_STK_OFFSET - sp)
                    < IA64_PT_REGS_SIZE) {
@@ -1963,7 +1964,7 @@ unw_unwind_to_user (struct unw_frame_info *info)
                                __FUNCTION__, ip);
                        return -1;
                }
-       }
+       } while (unw_unwind(info) >= 0);
        unw_get_ip(info, &ip);
        UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n",
                   __FUNCTION__, ip);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to