diff options
-rw-r--r-- | arch/ia64/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_64.h | 2 | ||||
-rw-r--r-- | arch/tile/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | include/linux/thread_info.h | 3 |
8 files changed, 9 insertions, 8 deletions
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index 8d600363fa57..f7ee85378311 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -141,7 +141,7 @@ static inline void set_restore_sigmask(void) | |||
141 | { | 141 | { |
142 | struct thread_info *ti = current_thread_info(); | 142 | struct thread_info *ti = current_thread_info(); |
143 | ti->status |= TS_RESTORE_SIGMASK; | 143 | ti->status |= TS_RESTORE_SIGMASK; |
144 | set_bit(TIF_SIGPENDING, &ti->flags); | 144 | WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags)); |
145 | } | 145 | } |
146 | static inline void clear_restore_sigmask(void) | 146 | static inline void clear_restore_sigmask(void) |
147 | { | 147 | { |
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h index 12e39206b3ef..6c610234ffab 100644 --- a/arch/microblaze/include/asm/thread_info.h +++ b/arch/microblaze/include/asm/thread_info.h | |||
@@ -166,7 +166,7 @@ static inline void set_restore_sigmask(void) | |||
166 | { | 166 | { |
167 | struct thread_info *ti = current_thread_info(); | 167 | struct thread_info *ti = current_thread_info(); |
168 | ti->status |= TS_RESTORE_SIGMASK; | 168 | ti->status |= TS_RESTORE_SIGMASK; |
169 | set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags); | 169 | WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags)); |
170 | } | 170 | } |
171 | static inline void clear_restore_sigmask(void) | 171 | static inline void clear_restore_sigmask(void) |
172 | { | 172 | { |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 85d50a93a92f..68831e9cf82f 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -140,7 +140,7 @@ static inline void set_restore_sigmask(void) | |||
140 | { | 140 | { |
141 | struct thread_info *ti = current_thread_info(); | 141 | struct thread_info *ti = current_thread_info(); |
142 | ti->local_flags |= _TLF_RESTORE_SIGMASK; | 142 | ti->local_flags |= _TLF_RESTORE_SIGMASK; |
143 | set_bit(TIF_SIGPENDING, &ti->flags); | 143 | WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags)); |
144 | } | 144 | } |
145 | static inline void clear_restore_sigmask(void) | 145 | static inline void clear_restore_sigmask(void) |
146 | { | 146 | { |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index a109157c6b8f..bc13b57cdc83 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -169,7 +169,7 @@ static inline void set_restore_sigmask(void) | |||
169 | { | 169 | { |
170 | struct thread_info *ti = current_thread_info(); | 170 | struct thread_info *ti = current_thread_info(); |
171 | ti->status |= TS_RESTORE_SIGMASK; | 171 | ti->status |= TS_RESTORE_SIGMASK; |
172 | set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags); | 172 | WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags)); |
173 | } | 173 | } |
174 | 174 | ||
175 | #define TI_FLAG_FAULT_CODE_SHIFT 24 | 175 | #define TI_FLAG_FAULT_CODE_SHIFT 24 |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index cb9b7a9f5fc1..cfa8c38fb9c8 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -238,7 +238,7 @@ static inline void set_restore_sigmask(void) | |||
238 | { | 238 | { |
239 | struct thread_info *ti = current_thread_info(); | 239 | struct thread_info *ti = current_thread_info(); |
240 | ti->status |= TS_RESTORE_SIGMASK; | 240 | ti->status |= TS_RESTORE_SIGMASK; |
241 | set_bit(TIF_SIGPENDING, &ti->flags); | 241 | WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags)); |
242 | } | 242 | } |
243 | static inline void clear_restore_sigmask(void) | 243 | static inline void clear_restore_sigmask(void) |
244 | { | 244 | { |
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h index 5aef371921e4..7e1fef36bde6 100644 --- a/arch/tile/include/asm/thread_info.h +++ b/arch/tile/include/asm/thread_info.h | |||
@@ -166,7 +166,7 @@ static inline void set_restore_sigmask(void) | |||
166 | { | 166 | { |
167 | struct thread_info *ti = current_thread_info(); | 167 | struct thread_info *ti = current_thread_info(); |
168 | ti->status |= TS_RESTORE_SIGMASK; | 168 | ti->status |= TS_RESTORE_SIGMASK; |
169 | set_bit(TIF_SIGPENDING, &ti->flags); | 169 | WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags)); |
170 | } | 170 | } |
171 | static inline void clear_restore_sigmask(void) | 171 | static inline void clear_restore_sigmask(void) |
172 | { | 172 | { |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 8f3f1ff69fa9..89f794f007ec 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -248,7 +248,7 @@ static inline void set_restore_sigmask(void) | |||
248 | { | 248 | { |
249 | struct thread_info *ti = current_thread_info(); | 249 | struct thread_info *ti = current_thread_info(); |
250 | ti->status |= TS_RESTORE_SIGMASK; | 250 | ti->status |= TS_RESTORE_SIGMASK; |
251 | set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags); | 251 | WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags)); |
252 | } | 252 | } |
253 | static inline void clear_restore_sigmask(void) | 253 | static inline void clear_restore_sigmask(void) |
254 | { | 254 | { |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index ed279701ac79..ccc1899bd62e 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define _LINUX_THREAD_INFO_H | 8 | #define _LINUX_THREAD_INFO_H |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/bug.h> | ||
11 | 12 | ||
12 | struct timespec; | 13 | struct timespec; |
13 | struct compat_timespec; | 14 | struct compat_timespec; |
@@ -125,7 +126,7 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) | |||
125 | static inline void set_restore_sigmask(void) | 126 | static inline void set_restore_sigmask(void) |
126 | { | 127 | { |
127 | set_thread_flag(TIF_RESTORE_SIGMASK); | 128 | set_thread_flag(TIF_RESTORE_SIGMASK); |
128 | set_thread_flag(TIF_SIGPENDING); | 129 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
129 | } | 130 | } |
130 | static inline void clear_restore_sigmask(void) | 131 | static inline void clear_restore_sigmask(void) |
131 | { | 132 | { |