Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
93f8230d
Commit
93f8230d
authored
May 14, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: use common die() function in bad_page_fault, from ppc32
parent
88c2a765
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
arch/ppc64/mm/fault.c
arch/ppc64/mm/fault.c
+10
-13
No files found.
arch/ppc64/mm/fault.c
View file @
93f8230d
...
...
@@ -45,9 +45,7 @@ extern int (*debugger_dabr_match)(struct pt_regs *);
int
debugger_kernel_faults
=
1
;
#endif
extern
void
die_if_kernel
(
char
*
,
struct
pt_regs
*
,
long
);
void
bad_page_fault
(
struct
pt_regs
*
,
unsigned
long
);
void
do_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
unsigned
long
);
void
bad_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
int
);
/*
* For 600- and 800-family processors, the error_code parameter is DSISR
...
...
@@ -86,7 +84,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
#endif
/* CONFIG_XMON || CONFIG_KGDB */
if
(
in_interrupt
()
||
mm
==
NULL
)
{
bad_page_fault
(
regs
,
address
);
bad_page_fault
(
regs
,
address
,
SIGSEGV
);
return
;
}
down_read
(
&
mm
->
mmap_sem
);
...
...
@@ -143,7 +141,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
bad_area:
up_read
(
&
mm
->
mmap_sem
);
/* User mode accesses cause a SIGSEGV */
if
(
user_mode
(
regs
))
{
info
.
si_signo
=
SIGSEGV
;
...
...
@@ -159,7 +157,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
return
;
}
bad_page_fault
(
regs
,
address
);
bad_page_fault
(
regs
,
address
,
SIGSEGV
);
return
;
/*
...
...
@@ -176,7 +174,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
printk
(
"VM: killing process %s
\n
"
,
current
->
comm
);
if
(
user_mode
(
regs
))
do_exit
(
SIGKILL
);
bad_page_fault
(
regs
,
address
);
bad_page_fault
(
regs
,
address
,
SIGKILL
);
return
;
do_sigbus:
...
...
@@ -187,7 +185,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
info
.
si_addr
=
(
void
*
)
address
;
force_sig_info
(
SIGBUS
,
&
info
,
current
);
if
(
!
user_mode
(
regs
))
bad_page_fault
(
regs
,
address
);
bad_page_fault
(
regs
,
address
,
SIGBUS
);
}
/*
...
...
@@ -196,8 +194,10 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
* in traps.c.
*/
void
bad_page_fault
(
struct
pt_regs
*
regs
,
unsigned
long
address
)
bad_page_fault
(
struct
pt_regs
*
regs
,
unsigned
long
address
,
int
sig
)
{
extern
void
die
(
const
char
*
,
struct
pt_regs
*
,
long
);
unsigned
long
fixup
;
/* Are we prepared to handle this fault? */
...
...
@@ -207,13 +207,10 @@ bad_page_fault(struct pt_regs *regs, unsigned long address)
}
/* kernel has accessed a bad area */
show_regs
(
regs
);
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
if
(
debugger_kernel_faults
)
debugger
(
regs
);
#endif
print_backtrace
(
(
unsigned
long
*
)
regs
->
gpr
[
1
]
);
panic
(
"kernel access of bad area pc %lx lr %lx address %lX tsk %s/%d"
,
regs
->
nip
,
regs
->
link
,
address
,
current
->
comm
,
current
->
pid
);
die
(
"Kernel access of bad area"
,
regs
,
sig
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment