View | Details | Raw Unified | Return to bug 973 | Differences between
and this patch

Collapse All | Expand All

(-)2.6/include/asm-i386/thread_info.h (+10 lines)
Lines 101-106 Link Here
101
101
102
#endif
102
#endif
103
103
104
static inline int kstack_end(void *addr)
105
{
106
	unsigned long offset = (unsigned long)addr & (THREAD_SIZE-1);
107
108
	/* Some APM bios versions misalign the stack */
109
	if (offset == 0 || offset > (THREAD_SIZE-sizeof(void*)))
110
			return 1;
111
	return 0;
112
}
113
104
/*
114
/*
105
 * thread information flags
115
 * thread information flags
106
 * - these are process state flags that various assembly files may need to access
116
 * - these are process state flags that various assembly files may need to access
(-)2.6/mm/slab.c (-1 / +1 lines)
Lines 862-868 Link Here
862
		unsigned long *sptr = &caller;
862
		unsigned long *sptr = &caller;
863
		unsigned long svalue;
863
		unsigned long svalue;
864
864
865
		while (((long) sptr & (THREAD_SIZE-1)) != 0) {
865
		while (!kstack_end(sptr)) {
866
			svalue = *sptr++;
866
			svalue = *sptr++;
867
			if (kernel_text_address(svalue)) {
867
			if (kernel_text_address(svalue)) {
868
				*addr++=svalue;
868
				*addr++=svalue;
(-)2.6/arch/i386/kernel/traps.c (-2 / +2 lines)
Lines 104-110 Link Here
104
#ifdef CONFIG_KALLSYMS
104
#ifdef CONFIG_KALLSYMS
105
	printk("\n");
105
	printk("\n");
106
#endif
106
#endif
107
	while (((long) stack & (THREAD_SIZE-1)) != 0) {
107
	while (!kstack_end(stack)) {
108
		addr = *stack++;
108
		addr = *stack++;
109
		if (kernel_text_address(addr)) {
109
		if (kernel_text_address(addr)) {
110
			printk(" [<%08lx>] ", addr);
110
			printk(" [<%08lx>] ", addr);
Lines 138-144 Link Here
138
138
139
	stack = esp;
139
	stack = esp;
140
	for(i = 0; i < kstack_depth_to_print; i++) {
140
	for(i = 0; i < kstack_depth_to_print; i++) {
141
		if (((long) stack & (THREAD_SIZE-1)) == 0)
141
		if (kstack_end(stack))
142
			break;
142
			break;
143
		if (i && ((i % 8) == 0))
143
		if (i && ((i % 8) == 0))
144
			printk("\n       ");
144
			printk("\n       ");

Return to bug 973