summaryrefslogtreecommitdiff
path: root/arch/x86/um/stub_segv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/um/stub_segv.c')
-rw-r--r--arch/x86/um/stub_segv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/um/stub_segv.c b/arch/x86/um/stub_segv.c
index 1518d2805ae8..040668b989b5 100644
--- a/arch/x86/um/stub_segv.c
+++ b/arch/x86/um/stub_segv.c
@@ -6,14 +6,15 @@
#include <sysdep/stub.h>
#include <sysdep/faultinfo.h>
#include <sysdep/mcontext.h>
+#include <sys/ucontext.h>
void __attribute__ ((__section__ (".__syscall_stub")))
stub_segv_handler(int sig, siginfo_t *info, void *p)
{
- struct ucontext *uc = p;
+ struct faultinfo *f = get_stub_data();
+ ucontext_t *uc = p;
- GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
- &uc->uc_mcontext);
+ GET_FAULTINFO_FROM_MC(*f, &uc->uc_mcontext);
trap_myself();
}