Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18089
b: refs/heads/master
c: 7fdf0d7
h: refs/heads/master
i:
  18087: 9426bf8
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jan 12, 2006
1 parent 9fad9f9 commit 0915bd7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02ef691f6ce4097da5617ebf59493487cb2b4f82
refs/heads/master: 7fdf0d7a2012e560fee738bfd7f2af26faeb3a39
8 changes: 4 additions & 4 deletions trunk/arch/arm26/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void dump_instr(struct pt_regs *regs)

/*static*/ void __dump_stack(struct task_struct *tsk, unsigned long sp)
{
dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->thread_info);
dump_mem("Stack: ", sp, 8192+(unsigned long)task_stack_page(tsk));
}

void dump_stack(void)
Expand All @@ -158,7 +158,7 @@ void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
} else if (verify_stack(fp)) {
printk("invalid frame pointer 0x%08x", fp);
ok = 0;
} else if (fp < (unsigned long)(tsk->thread_info + 1))
} else if (fp < (unsigned long)end_of_stack(tsk))
printk("frame pointer underflow");
printk("\n");

Expand All @@ -168,7 +168,7 @@ void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)

/* FIXME - this is probably wrong.. */
void show_stack(struct task_struct *task, unsigned long *sp) {
dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task->thread_info);
dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task_stack_page(task));
}

DEFINE_SPINLOCK(die_lock);
Expand All @@ -187,7 +187,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
printk("CPU: %d\n", smp_processor_id());
show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
current->comm, current->pid, tsk->thread_info + 1);
current->comm, current->pid, end_of_stack(tsk));

if (!user_mode(regs) || in_interrupt()) {
__dump_stack(tsk, (unsigned long)(regs + 1));
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-arm26/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static inline struct thread_info *current_thread_info(void)

/* FIXME - PAGE_SIZE < 32K */
#define THREAD_SIZE (8*32768) // FIXME - this needs attention (see kernel/fork.c which gets a nice div by zero if this is lower than 8*32768
#define task_pt_regs(task) ((struct pt_regs *)((unsigned long)(task)->thread_info + THREAD_SIZE - 8) - 1)
#define task_pt_regs(task) ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE - 8) - 1)

extern struct thread_info *alloc_thread_info(struct task_struct *task);
extern void free_thread_info(struct thread_info *);
Expand Down

0 comments on commit 0915bd7

Please sign in to comment.