Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309979
b: refs/heads/master
c: 20ba5d7
h: refs/heads/master
i:
  309977: 8c967c8
  309975: f435809
v: v3
  • Loading branch information
Al Viro committed May 30, 2012
1 parent fa4ee71 commit e6346f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 545ec2c7945bf7d22d0779e7dc9bf16f7dd9ae34
refs/heads/master: 20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d
7 changes: 4 additions & 3 deletions trunk/fs/signalfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,21 @@ SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
if (ufd < 0)
kfree(ctx);
} else {
struct file *file = fget(ufd);
int fput_needed;
struct file *file = fget_light(ufd, &fput_needed);
if (!file)
return -EBADF;
ctx = file->private_data;
if (file->f_op != &signalfd_fops) {
fput(file);
fput_light(file, fput_needed);
return -EINVAL;
}
spin_lock_irq(&current->sighand->siglock);
ctx->sigmask = sigmask;
spin_unlock_irq(&current->sighand->siglock);

wake_up(&current->sighand->signalfd_wqh);
fput(file);
fput_light(file, fput_needed);
}

return ufd;
Expand Down

0 comments on commit e6346f3

Please sign in to comment.