hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/hexagon/kernel/signal.c
....@@ -1,21 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Signal support for Hexagon processor
34 *
45 * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 and
8
- * only version 2 as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
- * 02110-1301, USA.
196 */
207
218 #include <linux/linkage.h>
....@@ -115,7 +102,7 @@
115102
116103 frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe));
117104
118
- if (!access_ok(VERIFY_WRITE, frame, sizeof(struct rt_sigframe)))
105
+ if (!access_ok(frame, sizeof(struct rt_sigframe)))
119106 return -EFAULT;
120107
121108 if (copy_siginfo_to_user(&frame->info, &ksig->info))
....@@ -168,7 +155,7 @@
168155 regs->r00 = -EINTR;
169156 break;
170157 }
171
- /* Fall through */
158
+ fallthrough;
172159 case -ERESTARTNOINTR:
173160 regs->r06 = regs->syscall_nr;
174161 pt_set_elr(regs, pt_elr(regs) - 4);
....@@ -244,7 +231,7 @@
244231 current->restart_block.fn = do_no_restart_syscall;
245232
246233 frame = (struct rt_sigframe __user *)pt_psp(regs);
247
- if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
234
+ if (!access_ok(frame, sizeof(*frame)))
248235 goto badframe;
249236 if (__copy_from_user(&blocked, &frame->uc.uc_sigmask, sizeof(blocked)))
250237 goto badframe;
....@@ -265,6 +252,6 @@
265252 return regs->r00;
266253
267254 badframe:
268
- force_sig(SIGSEGV, current);
255
+ force_sig(SIGSEGV);
269256 return 0;
270257 }