X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fcompat.c;h=d74d82155d78e20cd008a289751bcaca70b27f7a;hb=46b2835771ad8ef19b8e081e8c90439408c7645f;hp=9a0f5f2b90c80653acbe2282d3820e8502307429;hpb=2d56d3c43cc97ae48586745556f5a5b564d61582;p=linux-2.6 diff --git a/net/compat.c b/net/compat.c index 9a0f5f2b90..d74d82155d 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;