diff options
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/signal.c | 26 | ||||
-rw-r--r-- | arch/xtensa/kernel/vmlinux.lds.S | 3 |
2 files changed, 5 insertions, 24 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c5e4ec0598d2..efe4e854b3cd 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -30,8 +30,6 @@ | |||
30 | 30 | ||
31 | #define DEBUG_SIG 0 | 31 | #define DEBUG_SIG 0 |
32 | 32 | ||
33 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | ||
34 | |||
35 | extern struct task_struct *coproc_owners[]; | 33 | extern struct task_struct *coproc_owners[]; |
36 | 34 | ||
37 | struct rt_sigframe | 35 | struct rt_sigframe |
@@ -261,7 +259,6 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3, | |||
261 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 259 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
262 | goto badframe; | 260 | goto badframe; |
263 | 261 | ||
264 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
265 | set_current_blocked(&set); | 262 | set_current_blocked(&set); |
266 | 263 | ||
267 | if (restore_sigcontext(regs, frame)) | 264 | if (restore_sigcontext(regs, frame)) |
@@ -452,15 +449,6 @@ static void do_signal(struct pt_regs *regs) | |||
452 | siginfo_t info; | 449 | siginfo_t info; |
453 | int signr; | 450 | int signr; |
454 | struct k_sigaction ka; | 451 | struct k_sigaction ka; |
455 | sigset_t oldset; | ||
456 | |||
457 | if (try_to_freeze()) | ||
458 | goto no_signal; | ||
459 | |||
460 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
461 | oldset = ¤t->saved_sigmask; | ||
462 | else | ||
463 | oldset = ¤t->blocked; | ||
464 | 452 | ||
465 | task_pt_regs(current)->icountlevel = 0; | 453 | task_pt_regs(current)->icountlevel = 0; |
466 | 454 | ||
@@ -501,19 +489,17 @@ static void do_signal(struct pt_regs *regs) | |||
501 | 489 | ||
502 | /* Whee! Actually deliver the signal. */ | 490 | /* Whee! Actually deliver the signal. */ |
503 | /* Set up the stack frame */ | 491 | /* Set up the stack frame */ |
504 | ret = setup_frame(signr, &ka, &info, oldset, regs); | 492 | ret = setup_frame(signr, &ka, &info, sigmask_to_save(), regs); |
505 | if (ret) | 493 | if (ret) |
506 | return; | 494 | return; |
507 | 495 | ||
508 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 496 | signal_delivered(signr, &info, &ka, regs, 0); |
509 | block_sigmask(&ka, signr); | ||
510 | if (current->ptrace & PT_SINGLESTEP) | 497 | if (current->ptrace & PT_SINGLESTEP) |
511 | task_pt_regs(current)->icountlevel = 1; | 498 | task_pt_regs(current)->icountlevel = 1; |
512 | 499 | ||
513 | return; | 500 | return; |
514 | } | 501 | } |
515 | 502 | ||
516 | no_signal: | ||
517 | /* Did we come from a system call? */ | 503 | /* Did we come from a system call? */ |
518 | if ((signed) regs->syscall >= 0) { | 504 | if ((signed) regs->syscall >= 0) { |
519 | /* Restart the system call - no handlers present */ | 505 | /* Restart the system call - no handlers present */ |
@@ -532,8 +518,7 @@ no_signal: | |||
532 | } | 518 | } |
533 | 519 | ||
534 | /* If there's no signal to deliver, we just restore the saved mask. */ | 520 | /* If there's no signal to deliver, we just restore the saved mask. */ |
535 | if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK)) | 521 | restore_saved_sigmask(); |
536 | set_current_blocked(¤t->saved_sigmask); | ||
537 | 522 | ||
538 | if (current->ptrace & PT_SINGLESTEP) | 523 | if (current->ptrace & PT_SINGLESTEP) |
539 | task_pt_regs(current)->icountlevel = 1; | 524 | task_pt_regs(current)->icountlevel = 1; |
@@ -548,9 +533,6 @@ void do_notify_resume(struct pt_regs *regs) | |||
548 | if (test_thread_flag(TIF_SIGPENDING)) | 533 | if (test_thread_flag(TIF_SIGPENDING)) |
549 | do_signal(regs); | 534 | do_signal(regs); |
550 | 535 | ||
551 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | 536 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
552 | tracehook_notify_resume(regs); | 537 | tracehook_notify_resume(regs); |
553 | if (current->replacement_session_keyring) | ||
554 | key_replace_session_keyring(); | ||
555 | } | ||
556 | } | 538 | } |
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index 88ecea3facb4..ee2e2089483d 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
@@ -83,7 +83,6 @@ SECTIONS | |||
83 | 83 | ||
84 | _text = .; | 84 | _text = .; |
85 | _stext = .; | 85 | _stext = .; |
86 | _ftext = .; | ||
87 | 86 | ||
88 | .text : | 87 | .text : |
89 | { | 88 | { |
@@ -112,7 +111,7 @@ SECTIONS | |||
112 | EXCEPTION_TABLE(16) | 111 | EXCEPTION_TABLE(16) |
113 | /* Data section */ | 112 | /* Data section */ |
114 | 113 | ||
115 | _fdata = .; | 114 | _sdata = .; |
116 | RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE) | 115 | RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE) |
117 | _edata = .; | 116 | _edata = .; |
118 | 117 | ||