Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190500
b: refs/heads/master
c: ce384d8
h: refs/heads/master
v: v3
  • Loading branch information
Yury Polyanskiy authored and Ralf Baechle committed Apr 30, 2010
1 parent 9400a75 commit 22623ac
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 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: fcf3ca4c3d6d911df8ee2b8f010ffe504d3aef71
refs/heads/master: ce384d83d00ee457c3931d3fdb9fa2c38e345a3c
4 changes: 2 additions & 2 deletions trunk/arch/mips/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ extern int ptrace_set_watch_regs(struct task_struct *child,

extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);

extern NORET_TYPE void die(const char *, const struct pt_regs *) ATTRIB_NORET;
extern NORET_TYPE void die(const char *, struct pt_regs *) ATTRIB_NORET;

static inline void die_if_kernel(const char *str, const struct pt_regs *regs)
static inline void die_if_kernel(const char *str, struct pt_regs *regs)
{
if (unlikely(!user_mode(regs)))
die(str, regs);
Expand Down
9 changes: 7 additions & 2 deletions trunk/arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,10 @@ void show_registers(const struct pt_regs *regs)

static DEFINE_SPINLOCK(die_lock);

void __noreturn die(const char * str, const struct pt_regs * regs)
void __noreturn die(const char * str, struct pt_regs * regs)
{
static int die_counter;
int sig = SIGSEGV;
#ifdef CONFIG_MIPS_MT_SMTC
unsigned long dvpret = dvpe();
#endif /* CONFIG_MIPS_MT_SMTC */
Expand All @@ -365,6 +366,10 @@ void __noreturn die(const char * str, const struct pt_regs * regs)
#ifdef CONFIG_MIPS_MT_SMTC
mips_mt_regdump(dvpret);
#endif /* CONFIG_MIPS_MT_SMTC */

if (notify_die(DIE_OOPS, str, regs, 0, current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
sig = 0;

printk("%s[#%d]:\n", str, ++die_counter);
show_registers(regs);
add_taint(TAINT_DIE);
Expand All @@ -379,7 +384,7 @@ void __noreturn die(const char * str, const struct pt_regs * regs)
panic("Fatal exception");
}

do_exit(SIGSEGV);
do_exit(sig);
}

extern struct exception_table_entry __start___dbe_table[];
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/sgi-ip22/ip22-berr.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void print_buserr(void)
void ip22_be_interrupt(int irq)
{
const int field = 2 * sizeof(unsigned long);
const struct pt_regs *regs = get_irq_regs();
struct pt_regs *regs = get_irq_regs();

save_and_clear_buserr();
print_buserr();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/sgi-ip22/ip28-berr.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static int ip28_be_interrupt(const struct pt_regs *regs)

void ip22_be_interrupt(int irq)
{
const struct pt_regs *regs = get_irq_regs();
struct pt_regs *regs = get_irq_regs();

count_be_interrupt++;

Expand Down

0 comments on commit 22623ac

Please sign in to comment.