Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/fs/signalfd.c b/fs/signalfd.c
- index 44b6845b071c..cc72b5b08946 100644
- --- a/fs/signalfd.c
- +++ b/fs/signalfd.c
- @@ -50,6 +50,7 @@ void signalfd_cleanup(struct sighand_struct *sighand)
- struct signalfd_ctx {
- sigset_t sigmask;
- + struct task_struct *task;
- };
- static int signalfd_release(struct inode *inode, struct file *file)
- @@ -63,14 +64,14 @@ static __poll_t signalfd_poll(struct file *file, poll_table *wait)
- struct signalfd_ctx *ctx = file->private_data;
- __poll_t events = 0;
- - poll_wait(file, ¤t->sighand->signalfd_wqh, wait);
- + poll_wait(file, &ctx->task->sighand->signalfd_wqh, wait);
- - spin_lock_irq(¤t->sighand->siglock);
- - if (next_signal(¤t->pending, &ctx->sigmask) ||
- - next_signal(¤t->signal->shared_pending,
- + spin_lock_irq(&ctx->task->sighand->siglock);
- + if (next_signal(&ctx->task->pending, &ctx->sigmask) ||
- + next_signal(&ctx->task->signal->shared_pending,
- &ctx->sigmask))
- events |= EPOLLIN;
- - spin_unlock_irq(¤t->sighand->siglock);
- + spin_unlock_irq(&ctx->task->sighand->siglock);
- return events;
- }
- @@ -280,6 +281,7 @@ static int do_signalfd4(int ufd, sigset_t *mask, int flags)
- return -ENOMEM;
- ctx->sigmask = *mask;
- + ctx->task = current;
- /*
- * When we call this, the initialization must be complete, since
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement