X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fcompat.c;h=d74d82155d78e20cd008a289751bcaca70b27f7a;hb=8269cc4e2b0ddcdcb9e7f2034c464ef8613737a1;hp=9a0f5f2b90c80653acbe2282d3820e8502307429;hpb=2d56d3c43cc97ae48586745556f5a5b564d61582;p=firefly-linux-kernel-4.4.55.git diff --git a/net/compat.c b/net/compat.c index 9a0f5f2b90c8..d74d82155d78 100644 --- a/net/compat.c +++ b/net/compat.c @@ -276,7 +276,8 @@ void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm) err = security_file_receive(fp[i]); if (err) break; - err = get_unused_fd(); + err = get_unused_fd_flags(MSG_CMSG_CLOEXEC & kmsg->msg_flags + ? O_CLOEXEC : 0); if (err < 0) break; new_fd = err;