hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/sparc/kernel/signal_32.c
....@@ -23,8 +23,6 @@
2323
2424 #include <linux/uaccess.h>
2525 #include <asm/ptrace.h>
26
-#include <asm/pgalloc.h>
27
-#include <asm/pgtable.h>
2826 #include <asm/cacheflush.h> /* flush_sig_insns */
2927 #include <asm/switch_to.h>
3028
....@@ -67,7 +65,7 @@
6765 */
6866 static inline bool invalid_frame_pointer(void __user *fp, int fplen)
6967 {
70
- if ((((unsigned long) fp) & 15) || !__access_ok((unsigned long)fp, fplen))
68
+ if ((((unsigned long) fp) & 15) || !access_ok(fp, fplen))
7169 return true;
7270
7371 return false;
....@@ -137,7 +135,7 @@
137135 return;
138136
139137 segv_and_exit:
140
- force_sig(SIGSEGV, current);
138
+ force_sig(SIGSEGV);
141139 }
142140
143141 asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
....@@ -196,7 +194,7 @@
196194 set_current_blocked(&set);
197195 return;
198196 segv:
199
- force_sig(SIGSEGV, current);
197
+ force_sig(SIGSEGV);
200198 }
201199
202200 static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize)
....@@ -442,7 +440,7 @@
442440 case ERESTARTSYS:
443441 if (!(sa->sa_flags & SA_RESTART))
444442 goto no_system_call_restart;
445
- /* fallthrough */
443
+ fallthrough;
446444 case ERESTARTNOINTR:
447445 regs->u_regs[UREG_I0] = orig_i0;
448446 regs->pc -= 4;
....@@ -508,6 +506,7 @@
508506 regs->pc -= 4;
509507 regs->npc -= 4;
510508 pt_regs_clear_syscall(regs);
509
+ fallthrough;
511510 case ERESTART_RESTARTBLOCK:
512511 regs->u_regs[UREG_G1] = __NR_restart_syscall;
513512 regs->pc -= 4;
....@@ -522,12 +521,10 @@
522521 void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
523522 unsigned long thread_info_flags)
524523 {
525
- if (thread_info_flags & _TIF_SIGPENDING)
524
+ if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
526525 do_signal(regs, orig_i0);
527
- if (thread_info_flags & _TIF_NOTIFY_RESUME) {
528
- clear_thread_flag(TIF_NOTIFY_RESUME);
526
+ if (thread_info_flags & _TIF_NOTIFY_RESUME)
529527 tracehook_notify_resume(regs);
530
- }
531528 }
532529
533530 asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr,