]> git.karo-electronics.de Git - linux-beck.git/commitdiff
set_restore_sigmask() is never called without SIGPENDING (and never should be)
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 27 Apr 2012 17:42:45 +0000 (13:42 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Jun 2012 16:58:50 +0000 (12:58 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/ia64/include/asm/thread_info.h
arch/microblaze/include/asm/thread_info.h
arch/powerpc/include/asm/thread_info.h
arch/sh/include/asm/thread_info.h
arch/sparc/include/asm/thread_info_64.h
arch/tile/include/asm/thread_info.h
arch/x86/include/asm/thread_info.h
include/linux/thread_info.h

index 8d600363fa573c157d8ae8fce8bcdd3d06af7d76..f7ee85378311a0f2d241a458640f697b4940a2a1 100644 (file)
@@ -141,7 +141,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->status |= TS_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, &ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags));
 }
 static inline void clear_restore_sigmask(void)
 {
index 12e39206b3efcf76f81e1141e204d8356ff4d992..6c610234ffab96c8d849dfc8dac498bfaf1c9919 100644 (file)
@@ -166,7 +166,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->status |= TS_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags));
 }
 static inline void clear_restore_sigmask(void)
 {
index 85d50a93a92fee9bc0d8f890b97c98e0be6a13d4..68831e9cf82f01ddf8f12164962d8db438b93af3 100644 (file)
@@ -140,7 +140,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->local_flags |= _TLF_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, &ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags));
 }
 static inline void clear_restore_sigmask(void)
 {
index a109157c6b8fe4e7125da524fb32264a66a81679..bc13b57cdc834210b95aaa70ea603298ed55f468 100644 (file)
@@ -169,7 +169,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->status |= TS_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags));
 }
 
 #define TI_FLAG_FAULT_CODE_SHIFT       24
index cb9b7a9f5fc1ccf81b88e268b4d70a41ac20b895..cfa8c38fb9c8511d51cfbe17e3d8792584d8b241 100644 (file)
@@ -238,7 +238,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->status |= TS_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, &ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags));
 }
 static inline void clear_restore_sigmask(void)
 {
index 5aef371921e4618a53c3d0a13cef96bfebaca1e1..7e1fef36bde6651f2f199115919c887e494448f4 100644 (file)
@@ -166,7 +166,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->status |= TS_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, &ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags));
 }
 static inline void clear_restore_sigmask(void)
 {
index 8f3f1ff69fa98e84e32662e8802d2b8b97d72df8..89f794f007ec1e4aa5bbd029bcb32182fffe1f48 100644 (file)
@@ -248,7 +248,7 @@ static inline void set_restore_sigmask(void)
 {
        struct thread_info *ti = current_thread_info();
        ti->status |= TS_RESTORE_SIGMASK;
-       set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
+       WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags));
 }
 static inline void clear_restore_sigmask(void)
 {
index ed279701ac79c9d8f3412553b877cc4b641e9e61..ccc1899bd62e991e4649b72e7145010f93f948f9 100644 (file)
@@ -8,6 +8,7 @@
 #define _LINUX_THREAD_INFO_H
 
 #include <linux/types.h>
+#include <linux/bug.h>
 
 struct timespec;
 struct compat_timespec;
@@ -125,7 +126,7 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
 static inline void set_restore_sigmask(void)
 {
        set_thread_flag(TIF_RESTORE_SIGMASK);
-       set_thread_flag(TIF_SIGPENDING);
+       WARN_ON(!test_thread_flag(TIF_SIGPENDING));
 }
 static inline void clear_restore_sigmask(void)
 {