| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Signal Handling for ARC |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
|---|
| 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 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | 6 | * |
|---|
| 10 | 7 | * vineetg: Jan 2010 (Restarting of timer related syscalls) |
|---|
| 11 | 8 | * |
|---|
| .. | .. |
|---|
| 212 | 209 | |
|---|
| 213 | 210 | sf = (struct rt_sigframe __force __user *)(regs->sp); |
|---|
| 214 | 211 | |
|---|
| 215 | | - if (!access_ok(VERIFY_READ, sf, sizeof(*sf))) |
|---|
| 212 | + if (!access_ok(sf, sizeof(*sf))) |
|---|
| 216 | 213 | goto badframe; |
|---|
| 217 | 214 | |
|---|
| 218 | 215 | if (__get_user(magic, &sf->sigret_magic)) |
|---|
| .. | .. |
|---|
| 240 | 237 | return regs->r0; |
|---|
| 241 | 238 | |
|---|
| 242 | 239 | badframe: |
|---|
| 243 | | - force_sig(SIGSEGV, current); |
|---|
| 240 | + force_sig(SIGSEGV); |
|---|
| 244 | 241 | return 0; |
|---|
| 245 | 242 | } |
|---|
| 246 | 243 | |
|---|
| .. | .. |
|---|
| 262 | 259 | frame = (void __user *)((sp - framesize) & ~7); |
|---|
| 263 | 260 | |
|---|
| 264 | 261 | /* Check that we can actually write to the signal frame */ |
|---|
| 265 | | - if (!access_ok(VERIFY_WRITE, frame, framesize)) |
|---|
| 262 | + if (!access_ok(frame, framesize)) |
|---|
| 266 | 263 | frame = NULL; |
|---|
| 267 | 264 | |
|---|
| 268 | 265 | return frame; |
|---|
| .. | .. |
|---|
| 367 | 364 | regs->r0 = -EINTR; |
|---|
| 368 | 365 | break; |
|---|
| 369 | 366 | } |
|---|
| 370 | | - /* fallthrough */ |
|---|
| 367 | + fallthrough; |
|---|
| 371 | 368 | |
|---|
| 372 | 369 | case -ERESTARTNOINTR: |
|---|
| 373 | 370 | /* |
|---|
| .. | .. |
|---|
| 408 | 405 | |
|---|
| 409 | 406 | restart_scall = in_syscall(regs) && syscall_restartable(regs); |
|---|
| 410 | 407 | |
|---|
| 411 | | - if (get_signal(&ksig)) { |
|---|
| 408 | + if (test_thread_flag(TIF_SIGPENDING) && get_signal(&ksig)) { |
|---|
| 412 | 409 | if (restart_scall) { |
|---|
| 413 | 410 | arc_restart_syscall(&ksig.ka, regs); |
|---|
| 414 | 411 | syscall_wont_restart(regs); /* No more restarts */ |
|---|
| .. | .. |
|---|
| 440 | 437 | * ASM glue gaurantees that this is only called when returning to |
|---|
| 441 | 438 | * user mode |
|---|
| 442 | 439 | */ |
|---|
| 443 | | - if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
|---|
| 440 | + if (test_thread_flag(TIF_NOTIFY_RESUME)) |
|---|
| 444 | 441 | tracehook_notify_resume(regs); |
|---|
| 445 | 442 | } |
|---|