diff options
Diffstat (limited to 'net/core/scm.c')
-rw-r--r-- | net/core/scm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index 292ad8d5ad76..44c4ec2c8769 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -228,7 +228,8 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) | |||
228 | err = security_file_receive(fp[i]); | 228 | err = security_file_receive(fp[i]); |
229 | if (err) | 229 | if (err) |
230 | break; | 230 | break; |
231 | err = get_unused_fd(); | 231 | err = get_unused_fd_flags(MSG_CMSG_CLOEXEC & msg->msg_flags |
232 | ? O_CLOEXEC : 0); | ||
232 | if (err < 0) | 233 | if (err < 0) |
233 | break; | 234 | break; |
234 | new_fd = err; | 235 | new_fd = err; |