Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96966
b: refs/heads/master
c: 9a33fc2
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed May 19, 2008
1 parent 12265e7 commit 7de01d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: bfd3c7a728fbe642f79f99482a6c01158c675545
refs/heads/master: 9a33fc217d2248838d52f8ef214b1909073f3eb4
10 changes: 9 additions & 1 deletion trunk/arch/sh/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/kdebug.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <asm/system.h>

#ifdef CONFIG_BUG
Expand All @@ -21,7 +22,14 @@ static void handle_BUG(struct pt_regs *regs)

int is_valid_bugaddr(unsigned long addr)
{
return addr >= PAGE_OFFSET;
unsigned short opcode;

if (addr < PAGE_OFFSET)
return 0;
if (probe_kernel_address((u16 *)addr, opcode))
return 0;

return opcode == TRAPA_BUG_OPCODE;
}
#endif

Expand Down

0 comments on commit 7de01d8

Please sign in to comment.