diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-23 15:28:58 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:58:50 -0400 |
commit | 6fd84c0831ec78d98736b76dc5e9b849f1dbfc9e (patch) | |
tree | d3d95e7a66f6edcd29cfc4f2ff01aec8422b5a88 | |
parent | bf343dfd877ebf16cfbc31ba121606c5b6cef01f (diff) |
TIF_RESTORE_SIGMASK can be set only when TIF_SIGPENDING is set
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/avr32/kernel/entry-avr32b.S | 4 | ||||
-rw-r--r-- | arch/avr32/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/blackfin/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 2 | ||||
-rw-r--r-- | arch/c6x/kernel/signal.c | 3 | ||||
-rw-r--r-- | arch/frv/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/mn10300/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/signal.c | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/signal_32.c | 2 |
13 files changed, 14 insertions, 19 deletions
diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S index 5e6beb2597a8..df2884181313 100644 --- a/arch/avr32/kernel/entry-avr32b.S +++ b/arch/avr32/kernel/entry-avr32b.S | |||
@@ -281,7 +281,7 @@ syscall_exit_work: | |||
281 | ld.w r1, r0[TI_flags] | 281 | ld.w r1, r0[TI_flags] |
282 | rjmp 1b | 282 | rjmp 1b |
283 | 283 | ||
284 | 2: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NOTIFY_RESUME | 284 | 2: mov r2, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
285 | tst r1, r2 | 285 | tst r1, r2 |
286 | breq 3f | 286 | breq 3f |
287 | unmask_interrupts | 287 | unmask_interrupts |
@@ -587,7 +587,7 @@ fault_exit_work: | |||
587 | ld.w r1, r0[TI_flags] | 587 | ld.w r1, r0[TI_flags] |
588 | rjmp fault_exit_work | 588 | rjmp fault_exit_work |
589 | 589 | ||
590 | 1: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NOTIFY_RESUME | 590 | 1: mov r2, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
591 | tst r1, r2 | 591 | tst r1, r2 |
592 | breq 2f | 592 | breq 2f |
593 | unmask_interrupts | 593 | unmask_interrupts |
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index dc7875a0ad79..3ac1a60f9eb6 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -303,7 +303,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) | |||
303 | if ((sysreg_read(SR) & MODE_MASK) == MODE_SUPERVISOR) | 303 | if ((sysreg_read(SR) & MODE_MASK) == MODE_SUPERVISOR) |
304 | syscall = 1; | 304 | syscall = 1; |
305 | 305 | ||
306 | if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 306 | if (ti->flags & _TIF_SIGPENDING)) |
307 | do_signal(regs, syscall); | 307 | do_signal(regs, syscall); |
308 | 308 | ||
309 | if (ti->flags & _TIF_NOTIFY_RESUME) { | 309 | if (ti->flags & _TIF_NOTIFY_RESUME) { |
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index 93d1ecd9213c..b20d435d084a 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -307,7 +307,7 @@ asmlinkage void do_signal(struct pt_regs *regs) | |||
307 | */ | 307 | */ |
308 | asmlinkage void do_notify_resume(struct pt_regs *regs) | 308 | asmlinkage void do_notify_resume(struct pt_regs *regs) |
309 | { | 309 | { |
310 | if (test_thread_flag(TIF_SIGPENDING) || test_thread_flag(TIF_RESTORE_SIGMASK)) | 310 | if (test_thread_flag(TIF_SIGPENDING)) |
311 | do_signal(regs); | 311 | do_signal(regs); |
312 | 312 | ||
313 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { | 313 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 80aa2535e2c9..04c2fbe41a7f 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -711,8 +711,6 @@ ENTRY(_system_call) | |||
711 | jump .Lresume_userspace_1; | 711 | jump .Lresume_userspace_1; |
712 | 712 | ||
713 | .Lsyscall_sigpending: | 713 | .Lsyscall_sigpending: |
714 | cc = BITTST(r7, TIF_RESTORE_SIGMASK); | ||
715 | if cc jump .Lsyscall_do_signals; | ||
716 | cc = BITTST(r7, TIF_SIGPENDING); | 714 | cc = BITTST(r7, TIF_SIGPENDING); |
717 | if cc jump .Lsyscall_do_signals; | 715 | if cc jump .Lsyscall_do_signals; |
718 | cc = BITTST(r7, TIF_NOTIFY_RESUME); | 716 | cc = BITTST(r7, TIF_NOTIFY_RESUME); |
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index f39346f1f2d6..d599a7fb5d24 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c | |||
@@ -335,8 +335,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags, | |||
335 | int syscall) | 335 | int syscall) |
336 | { | 336 | { |
337 | /* deal with pending signal delivery */ | 337 | /* deal with pending signal delivery */ |
338 | if (thread_info_flags & ((1 << TIF_SIGPENDING) | | 338 | if (thread_info_flags & (1 << TIF_SIGPENDING)) |
339 | (1 << TIF_RESTORE_SIGMASK))) | ||
340 | do_signal(regs, syscall); | 339 | do_signal(regs, syscall); |
341 | 340 | ||
342 | if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) { | 341 | if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) { |
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index c4d9cfa0c8a3..9ec3d2e27b4c 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -533,7 +533,7 @@ asmlinkage void do_notify_resume(__u32 thread_info_flags) | |||
533 | clear_thread_flag(TIF_SINGLESTEP); | 533 | clear_thread_flag(TIF_SINGLESTEP); |
534 | 534 | ||
535 | /* deal with pending signal delivery */ | 535 | /* deal with pending signal delivery */ |
536 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 536 | if (thread_info_flags & _TIF_SIGPENDING)) |
537 | do_signal(); | 537 | do_signal(); |
538 | 538 | ||
539 | /* deal with notification on about to resume userspace execution */ | 539 | /* deal with notification on about to resume userspace execution */ |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 53c6e90082f0..896165757e6f 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -610,7 +610,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, | |||
610 | local_irq_enable(); | 610 | local_irq_enable(); |
611 | 611 | ||
612 | /* deal with pending signal delivery */ | 612 | /* deal with pending signal delivery */ |
613 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 613 | if (thread_info_flags & _TIF_SIGPENDING) |
614 | do_signal(regs); | 614 | do_signal(regs); |
615 | 615 | ||
616 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 616 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 1715478f4e94..d57013e06ea0 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -532,7 +532,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags) | |||
532 | } | 532 | } |
533 | 533 | ||
534 | /* deal with pending signal delivery */ | 534 | /* deal with pending signal delivery */ |
535 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 535 | if (thread_info_flags & _TIF_SIGPENDING) |
536 | do_signal(regs); | 536 | do_signal(regs); |
537 | 537 | ||
538 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 538 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index 83ae7dd4d99e..22b4726dee49 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
@@ -74,7 +74,7 @@ struct thread_info { | |||
74 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) | 74 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) |
75 | 75 | ||
76 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ | 76 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ |
77 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) | 77 | _TIF_NEED_RESCHED) |
78 | 78 | ||
79 | #endif /* __KERNEL__ */ | 79 | #endif /* __KERNEL__ */ |
80 | 80 | ||
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index c7fbc96472f3..18670a078849 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -924,7 +924,7 @@ intr_check_sig: | |||
924 | /* As above */ | 924 | /* As above */ |
925 | mfctl %cr30,%r1 | 925 | mfctl %cr30,%r1 |
926 | LDREG TI_FLAGS(%r1),%r19 | 926 | LDREG TI_FLAGS(%r1),%r19 |
927 | ldi (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NOTIFY_RESUME), %r20 | 927 | ldi (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME), %r20 |
928 | and,COND(<>) %r19, %r20, %r0 | 928 | and,COND(<>) %r19, %r20, %r0 |
929 | b,n intr_restore /* skip past if we've nothing to do */ | 929 | b,n intr_restore /* skip past if we've nothing to do */ |
930 | 930 | ||
@@ -2032,7 +2032,7 @@ syscall_check_resched: | |||
2032 | .import do_signal,code | 2032 | .import do_signal,code |
2033 | syscall_check_sig: | 2033 | syscall_check_sig: |
2034 | LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 | 2034 | LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 |
2035 | ldi (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NOTIFY_RESUME), %r26 | 2035 | ldi (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME), %r26 |
2036 | and,COND(<>) %r19, %r26, %r0 | 2036 | and,COND(<>) %r19, %r26, %r0 |
2037 | b,n syscall_restore /* skip past if we've nothing to do */ | 2037 | b,n syscall_restore /* skip past if we've nothing to do */ |
2038 | 2038 | ||
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index d6ddc572eba1..7f3c8f2c962d 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -613,8 +613,7 @@ do_signal(struct pt_regs *regs, long in_syscall) | |||
613 | 613 | ||
614 | void do_notify_resume(struct pt_regs *regs, long in_syscall) | 614 | void do_notify_resume(struct pt_regs *regs, long in_syscall) |
615 | { | 615 | { |
616 | if (test_thread_flag(TIF_SIGPENDING) || | 616 | if (test_thread_flag(TIF_SIGPENDING)) |
617 | test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
618 | do_signal(regs, in_syscall); | 617 | do_signal(regs, in_syscall); |
619 | 618 | ||
620 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { | 619 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 5af664932452..e6cd224506a9 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -131,8 +131,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
132 | 132 | ||
133 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ | 133 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ |
134 | _TIF_SIGPENDING | \ | 134 | _TIF_SIGPENDING) |
135 | _TIF_RESTORE_SIGMASK) | ||
136 | 135 | ||
137 | #endif /* __KERNEL__ */ | 136 | #endif /* __KERNEL__ */ |
138 | 137 | ||
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index ee81b90c532f..f6722427203d 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -567,7 +567,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
567 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, | 567 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, |
568 | unsigned long thread_info_flags) | 568 | unsigned long thread_info_flags) |
569 | { | 569 | { |
570 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 570 | if (thread_info_flags & _TIF_SIGPENDING) |
571 | do_signal(regs, orig_i0); | 571 | do_signal(regs, orig_i0); |
572 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 572 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
573 | clear_thread_flag(TIF_NOTIFY_RESUME); | 573 | clear_thread_flag(TIF_NOTIFY_RESUME); |