| .. | .. |
|---|
| 35 | 35 | #include <asm/entry.h> |
|---|
| 36 | 36 | #include <asm/ucontext.h> |
|---|
| 37 | 37 | #include <linux/uaccess.h> |
|---|
| 38 | | -#include <asm/pgtable.h> |
|---|
| 39 | | -#include <asm/pgalloc.h> |
|---|
| 40 | 38 | #include <linux/syscalls.h> |
|---|
| 41 | 39 | #include <asm/cacheflush.h> |
|---|
| 42 | 40 | #include <asm/syscalls.h> |
|---|
| .. | .. |
|---|
| 91 | 89 | /* Always make any pending restarted system calls return -EINTR */ |
|---|
| 92 | 90 | current->restart_block.fn = do_no_restart_syscall; |
|---|
| 93 | 91 | |
|---|
| 94 | | - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
|---|
| 92 | + if (!access_ok(frame, sizeof(*frame))) |
|---|
| 95 | 93 | goto badframe; |
|---|
| 96 | 94 | |
|---|
| 97 | 95 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
|---|
| .. | .. |
|---|
| 108 | 106 | return rval; |
|---|
| 109 | 107 | |
|---|
| 110 | 108 | badframe: |
|---|
| 111 | | - force_sig(SIGSEGV, current); |
|---|
| 109 | + force_sig(SIGSEGV); |
|---|
| 112 | 110 | return 0; |
|---|
| 113 | 111 | } |
|---|
| 114 | 112 | |
|---|
| .. | .. |
|---|
| 166 | 164 | |
|---|
| 167 | 165 | frame = get_sigframe(ksig, regs, sizeof(*frame)); |
|---|
| 168 | 166 | |
|---|
| 169 | | - if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
|---|
| 167 | + if (!access_ok(frame, sizeof(*frame))) |
|---|
| 170 | 168 | return -EFAULT; |
|---|
| 171 | 169 | |
|---|
| 172 | 170 | if (ksig->ka.sa.sa_flags & SA_SIGINFO) |
|---|
| .. | .. |
|---|
| 195 | 193 | |
|---|
| 196 | 194 | address = ((unsigned long)frame->tramp); |
|---|
| 197 | 195 | #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); |
|---|
| 201 | 197 | |
|---|
| 202 | 198 | preempt_disable(); |
|---|
| 203 | 199 | ptep = pte_offset_map(pmdp, address); |
|---|
| .. | .. |
|---|
| 253 | 249 | regs->r3 = -EINTR; |
|---|
| 254 | 250 | break; |
|---|
| 255 | 251 | } |
|---|
| 256 | | - /* fallthrough */ |
|---|
| 252 | + fallthrough; |
|---|
| 257 | 253 | case -ERESTARTNOINTR: |
|---|
| 258 | 254 | do_restart: |
|---|
| 259 | 255 | /* offset of 4 bytes to re-execute trap (brki) instruction */ |
|---|
| .. | .. |
|---|
| 317 | 313 | |
|---|
| 318 | 314 | asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall) |
|---|
| 319 | 315 | { |
|---|
| 320 | | - if (test_thread_flag(TIF_SIGPENDING)) |
|---|
| 316 | + if (test_thread_flag(TIF_SIGPENDING) || |
|---|
| 317 | + test_thread_flag(TIF_NOTIFY_SIGNAL)) |
|---|
| 321 | 318 | do_signal(regs, in_syscall); |
|---|
| 322 | 319 | |
|---|
| 323 | | - if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
|---|
| 320 | + if (test_thread_flag(TIF_NOTIFY_RESUME)) |
|---|
| 324 | 321 | tracehook_notify_resume(regs); |
|---|
| 325 | 322 | } |
|---|