hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/microblaze/kernel/signal.c
....@@ -35,8 +35,6 @@
3535 #include <asm/entry.h>
3636 #include <asm/ucontext.h>
3737 #include <linux/uaccess.h>
38
-#include <asm/pgtable.h>
39
-#include <asm/pgalloc.h>
4038 #include <linux/syscalls.h>
4139 #include <asm/cacheflush.h>
4240 #include <asm/syscalls.h>
....@@ -91,7 +89,7 @@
9189 /* Always make any pending restarted system calls return -EINTR */
9290 current->restart_block.fn = do_no_restart_syscall;
9391
94
- if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
92
+ if (!access_ok(frame, sizeof(*frame)))
9593 goto badframe;
9694
9795 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
....@@ -108,7 +106,7 @@
108106 return rval;
109107
110108 badframe:
111
- force_sig(SIGSEGV, current);
109
+ force_sig(SIGSEGV);
112110 return 0;
113111 }
114112
....@@ -166,7 +164,7 @@
166164
167165 frame = get_sigframe(ksig, regs, sizeof(*frame));
168166
169
- if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
167
+ if (!access_ok(frame, sizeof(*frame)))
170168 return -EFAULT;
171169
172170 if (ksig->ka.sa.sa_flags & SA_SIGINFO)
....@@ -195,9 +193,7 @@
195193
196194 address = ((unsigned long)frame->tramp);
197195 #ifdef CONFIG_MMU
198
- pmdp = pmd_offset(pud_offset(
199
- pgd_offset(current->mm, address),
200
- address), address);
196
+ pmdp = pmd_off(current->mm, address);
201197
202198 preempt_disable();
203199 ptep = pte_offset_map(pmdp, address);
....@@ -253,7 +249,7 @@
253249 regs->r3 = -EINTR;
254250 break;
255251 }
256
- /* fallthrough */
252
+ fallthrough;
257253 case -ERESTARTNOINTR:
258254 do_restart:
259255 /* offset of 4 bytes to re-execute trap (brki) instruction */
....@@ -317,9 +313,10 @@
317313
318314 asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
319315 {
320
- if (test_thread_flag(TIF_SIGPENDING))
316
+ if (test_thread_flag(TIF_SIGPENDING) ||
317
+ test_thread_flag(TIF_NOTIFY_SIGNAL))
321318 do_signal(regs, in_syscall);
322319
323
- if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME))
320
+ if (test_thread_flag(TIF_NOTIFY_RESUME))
324321 tracehook_notify_resume(regs);
325322 }