diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-18 01:16:39 +0200 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-21 15:30:54 +0200 |
commit | 0a996c1a3f260ba6fe1201a668d31fa8d8339793 (patch) | |
tree | 24db881f7fa63a53e12d4d31a759cb1dd7293b64 /arch/x86/entry/vsyscall | |
parent | 419ceeb12865998b940ebd86d5fb415efde1e864 (diff) | |
download | blackbird-op-linux-0a996c1a3f260ba6fe1201a668d31fa8d8339793.tar.gz blackbird-op-linux-0a996c1a3f260ba6fe1201a668d31fa8d8339793.zip |
signal/x86: Use force_sig_fault where appropriate
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/x86/entry/vsyscall')
-rw-r--r-- | arch/x86/entry/vsyscall/vsyscall_64.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index 82ed001e8909..85fd85d52ffd 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -100,20 +100,13 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size) */ if (!access_ok(VERIFY_WRITE, (void __user *)ptr, size)) { - siginfo_t info; struct thread_struct *thread = ¤t->thread; thread->error_code = 6; /* user fault, no page, write */ thread->cr2 = ptr; thread->trap_nr = X86_TRAP_PF; - clear_siginfo(&info); - info.si_signo = SIGSEGV; - info.si_errno = 0; - info.si_code = SEGV_MAPERR; - info.si_addr = (void __user *)ptr; - - force_sig_info(SIGSEGV, &info, current); + force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *)ptr, current); return false; } else { return true; |