diff options
Diffstat (limited to 'fs/signalfd.c')
-rw-r--r-- | fs/signalfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c index c8609fa51a13..5441a4bca772 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -211,7 +211,7 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, | |||
211 | sigset_t sigmask; | 211 | sigset_t sigmask; |
212 | struct signalfd_ctx *ctx; | 212 | struct signalfd_ctx *ctx; |
213 | 213 | ||
214 | if (flags & ~SFD_CLOEXEC) | 214 | if (flags & ~(SFD_CLOEXEC | SFD_NONBLOCK)) |
215 | return -EINVAL; | 215 | return -EINVAL; |
216 | 216 | ||
217 | if (sizemask != sizeof(sigset_t) || | 217 | if (sizemask != sizeof(sigset_t) || |
@@ -232,7 +232,7 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, | |||
232 | * anon_inode_getfd() will install the fd. | 232 | * anon_inode_getfd() will install the fd. |
233 | */ | 233 | */ |
234 | ufd = anon_inode_getfd("[signalfd]", &signalfd_fops, ctx, | 234 | ufd = anon_inode_getfd("[signalfd]", &signalfd_fops, ctx, |
235 | flags & O_CLOEXEC); | 235 | flags & (O_CLOEXEC | O_NONBLOCK)); |
236 | if (ufd < 0) | 236 | if (ufd < 0) |
237 | kfree(ctx); | 237 | kfree(ctx); |
238 | } else { | 238 | } else { |