aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/signalfd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c
index f1da89203a9a..3b07f26d984d 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -133,7 +133,8 @@ static unsigned int signalfd_poll(struct file *file, poll_table *wait)
133 * the peer disconnects. 133 * the peer disconnects.
134 */ 134 */
135 if (signalfd_lock(ctx, &lk)) { 135 if (signalfd_lock(ctx, &lk)) {
136 if (next_signal(&lk.tsk->pending, &ctx->sigmask) > 0 || 136 if ((lk.tsk == current &&
137 next_signal(&lk.tsk->pending, &ctx->sigmask) > 0) ||
137 next_signal(&lk.tsk->signal->shared_pending, 138 next_signal(&lk.tsk->signal->shared_pending,
138 &ctx->sigmask) > 0) 139 &ctx->sigmask) > 0)
139 events |= POLLIN; 140 events |= POLLIN;