ChangeSet 1.2231.1.83, 2005/03/28 19:39:37-08:00, [EMAIL PROTECTED]

        [PATCH] x86_64: Fix exception stack detection during backtraces
        
        The test in in_exception_stack was done the wrong way round, which lead 
to
        incorrect exception stack detection in the kernel backtracer.
        
        Also fix a off by one in the test.
        
        Noticed by Jan Beulich
        
        Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
        Cc: <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 traps.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
--- a/arch/x86_64/kernel/traps.c        2005-03-28 21:24:42 -08:00
+++ b/arch/x86_64/kernel/traps.c        2005-03-28 21:24:42 -08:00
@@ -124,10 +124,10 @@
        int k;
        for (k = 0; k < N_EXCEPTION_STACKS; k++) {
                struct tss_struct *tss = &per_cpu(init_tss, cpu);
-               unsigned long end = tss->ist[k] + EXCEPTION_STKSZ;
+               unsigned long start = tss->ist[k] - EXCEPTION_STKSZ;
 
-               if (stack >= tss->ist[k]  && stack <= end)
-                       return (unsigned long *)end;
+               if (stack >= start && stack < tss->ist[k])
+                       return (unsigned long *)tss->ist[k];
        }
        return NULL;
 } 
-
To unsubscribe from this list: send the line "unsubscribe bk-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