Skip to content

Commit

Permalink
set_restore_sigmask() is never called without SIGPENDING (and never s…
Browse files Browse the repository at this point in the history
…hould be)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jun 1, 2012
1 parent 6fd84c0 commit edd63a2
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion arch/ia64/include/asm/thread_info.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/include/asm/thread_info.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/thread_info.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/include/asm/thread_info.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/thread_info_64.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/tile/include/asm/thread_info.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/thread_info.h
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion include/linux/thread_info.h
Expand Up @@ -8,6 +8,7 @@
#define _LINUX_THREAD_INFO_H

#include <linux/types.h>
#include <linux/bug.h>

struct timespec;
struct compat_timespec;
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit edd63a2

Please sign in to comment.