--- zzzz-none-000/linux-2.6.19.2/arch/x86_64/kernel/traps.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/arch/x86_64/kernel/traps.c 2007-01-11 07:38:19.000000000 +0000 @@ -242,19 +242,12 @@ * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack */ -static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) -{ - void *t = (void *)tinfo; - return p > t && p < t + THREAD_SIZE - 3; -} - void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, struct stacktrace_ops *ops, void *data) { const unsigned cpu = smp_processor_id(); unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; unsigned used = 0; - struct thread_info *tinfo; if (!tsk) tsk = current; @@ -297,12 +290,6 @@ if (tsk && tsk != current) stack = (unsigned long *)tsk->thread.rsp; } - /* - * Align the stack pointer on word boundary, later loops - * rely on that (and corruption / debug info bugs can cause - * unaligned values here): - */ - stack = (unsigned long *)((unsigned long)stack & ~(sizeof(long)-1)); /* * Print function call entries within a stack. 'cond' is the @@ -377,8 +364,7 @@ /* * This handles the process stack: */ - tinfo = current_thread_info(); - HANDLE_STACK (valid_stack_ptr(tinfo, stack)); + HANDLE_STACK (((long) stack & (THREAD_SIZE-1)) != 0); #undef HANDLE_STACK } EXPORT_SYMBOL(dump_trace);