]> git.baikalelectronics.ru Git - kernel.git/commit
signals: avoid random wakeups in sigsuspend()
authorSasha Levin <sasha.levin@oracle.com>
Fri, 5 Feb 2016 23:36:05 +0000 (15:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Feb 2016 02:10:40 +0000 (18:10 -0800)
commit6bb965b09981a720a6bd8d9cf8d1bd2fcead5132
tree56e8dd97ecfe996c6337c17e8255fa4bf716bcf2
parent3eb73f656644e3a27a53eb343529fcfd7a4ec16c
signals: avoid random wakeups in sigsuspend()

A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
being set.

Avoid that by making sure we were signaled, like sys_pause() does.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/signal.c