uml: get rid of do_longjmp
do_longjmp used to be needed when UML didn't have its own implementation of setjmp and longjmp. They came from libc, and couldn't be called directly from kernel code, as the libc jmp_buf couldn't be imported there. do_longjmp was a userspace function which served to provide longjmp access to kernel code. This is gone, and a number of void * pointers can now be jmp_buf *. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
0a7675aa20
commit
fab95c55e3
@@ -149,7 +149,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
|
||||
struct uml_pt_regs *regs)
|
||||
{
|
||||
struct siginfo si;
|
||||
void *catcher;
|
||||
jmp_buf *catcher;
|
||||
int err;
|
||||
int is_write = FAULT_WRITE(fi);
|
||||
unsigned long address = FAULT_ADDRESS(fi);
|
||||
@@ -181,7 +181,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
|
||||
return 0;
|
||||
else if (catcher != NULL) {
|
||||
current->thread.fault_addr = (void *) address;
|
||||
do_longjmp(catcher, 1);
|
||||
UML_LONGJMP(catcher, 1);
|
||||
}
|
||||
else if (current->thread.fault_addr != NULL)
|
||||
panic("fault_addr set but no fault catcher");
|
||||
@@ -233,7 +233,7 @@ void relay_signal(int sig, struct uml_pt_regs *regs)
|
||||
static void bus_handler(int sig, struct uml_pt_regs *regs)
|
||||
{
|
||||
if (current->thread.fault_catcher != NULL)
|
||||
do_longjmp(current->thread.fault_catcher, 1);
|
||||
UML_LONGJMP(current->thread.fault_catcher, 1);
|
||||
else relay_signal(sig, regs);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user