| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2003 Broadcom Corporation |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or |
|---|
| 5 | | - * modify it under the terms of the GNU General Public License |
|---|
| 6 | | - * as published by the Free Software Foundation; either version 2 |
|---|
| 7 | | - * of the License, or (at your option) any later version. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License |
|---|
| 15 | | - * along with this program; if not, write to the Free Software |
|---|
| 16 | | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 17 | 4 | */ |
|---|
| 18 | 5 | #include <linux/cache.h> |
|---|
| 19 | 6 | #include <linux/sched.h> |
|---|
| .. | .. |
|---|
| 73 | 60 | |
|---|
| 74 | 61 | regs = current_pt_regs(); |
|---|
| 75 | 62 | frame = (struct rt_sigframe_n32 __user *)regs->regs[29]; |
|---|
| 76 | | - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
|---|
| 63 | + if (!access_ok(frame, sizeof(*frame))) |
|---|
| 77 | 64 | goto badframe; |
|---|
| 78 | 65 | if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask)) |
|---|
| 79 | 66 | goto badframe; |
|---|
| .. | .. |
|---|
| 84 | 71 | if (sig < 0) |
|---|
| 85 | 72 | goto badframe; |
|---|
| 86 | 73 | else if (sig) |
|---|
| 87 | | - force_sig(sig, current); |
|---|
| 74 | + force_sig(sig); |
|---|
| 88 | 75 | |
|---|
| 89 | 76 | if (compat_restore_altstack(&frame->rs_uc.uc_stack)) |
|---|
| 90 | 77 | goto badframe; |
|---|
| .. | .. |
|---|
| 100 | 87 | /* Unreached */ |
|---|
| 101 | 88 | |
|---|
| 102 | 89 | badframe: |
|---|
| 103 | | - force_sig(SIGSEGV, current); |
|---|
| 90 | + force_sig(SIGSEGV); |
|---|
| 104 | 91 | } |
|---|
| 105 | 92 | |
|---|
| 106 | 93 | static int setup_rt_frame_n32(void *sig_return, struct ksignal *ksig, |
|---|
| .. | .. |
|---|
| 110 | 97 | int err = 0; |
|---|
| 111 | 98 | |
|---|
| 112 | 99 | frame = get_sigframe(ksig, regs, sizeof(*frame)); |
|---|
| 113 | | - if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
|---|
| 100 | + if (!access_ok(frame, sizeof (*frame))) |
|---|
| 114 | 101 | return -EFAULT; |
|---|
| 115 | 102 | |
|---|
| 116 | 103 | /* Create siginfo. */ |
|---|