hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/sparc/kernel/signal_64.c
....@@ -25,7 +25,6 @@
2525
2626 #include <linux/uaccess.h>
2727 #include <asm/ptrace.h>
28
-#include <asm/pgtable.h>
2928 #include <asm/fpumacro.h>
3029 #include <asm/uctx.h>
3130 #include <asm/siginfo.h>
....@@ -134,7 +133,7 @@
134133 exception_exit(prev_state);
135134 return;
136135 do_sigsegv:
137
- force_sig(SIGSEGV, current);
136
+ force_sig(SIGSEGV);
138137 goto out;
139138 }
140139
....@@ -228,7 +227,7 @@
228227 exception_exit(prev_state);
229228 return;
230229 do_sigsegv:
231
- force_sig(SIGSEGV, current);
230
+ force_sig(SIGSEGV);
232231 goto out;
233232 }
234233
....@@ -320,7 +319,7 @@
320319 set_current_blocked(&set);
321320 return;
322321 segv:
323
- force_sig(SIGSEGV, current);
322
+ force_sig(SIGSEGV);
324323 }
325324
326325 static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize)
....@@ -374,7 +373,7 @@
374373 pr_info("%s[%d] bad frame in setup_rt_frame: %016lx TPC %016lx O7 %016lx\n",
375374 current->comm, current->pid, (unsigned long)sf,
376375 regs->tpc, regs->u_regs[UREG_I7]);
377
- force_sigsegv(ksig->sig, current);
376
+ force_sigsegv(ksig->sig);
378377 return -EINVAL;
379378 }
380379
....@@ -462,7 +461,7 @@
462461 case ERESTARTSYS:
463462 if (!(sa->sa_flags & SA_RESTART))
464463 goto no_system_call_restart;
465
- /* fallthrough */
464
+ fallthrough;
466465 case ERESTARTNOINTR:
467466 regs->u_regs[UREG_I0] = orig_i0;
468467 regs->tpc -= 4;
....@@ -533,6 +532,7 @@
533532 regs->tpc -= 4;
534533 regs->tnpc -= 4;
535534 pt_regs_clear_syscall(regs);
535
+ fallthrough;
536536 case ERESTART_RESTARTBLOCK:
537537 regs->u_regs[UREG_G1] = __NR_restart_syscall;
538538 regs->tpc -= 4;
....@@ -549,12 +549,10 @@
549549 user_exit();
550550 if (thread_info_flags & _TIF_UPROBE)
551551 uprobe_notify_resume(regs);
552
- if (thread_info_flags & _TIF_SIGPENDING)
552
+ if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
553553 do_signal(regs, orig_i0);
554
- if (thread_info_flags & _TIF_NOTIFY_RESUME) {
555
- clear_thread_flag(TIF_NOTIFY_RESUME);
554
+ if (thread_info_flags & _TIF_NOTIFY_RESUME)
556555 tracehook_notify_resume(regs);
557
- }
558556 user_enter();
559557 }
560558