X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fcompat.c;h=d74d82155d78e20cd008a289751bcaca70b27f7a;hb=cb276805803b8e0616159d80a441ab26a931ada4;hp=9a0f5f2b90c80653acbe2282d3820e8502307429;hpb=ded1504dfa0083661fdd1a0a5f021cb7313ffe04;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;