Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
F_DUPFD_CLOEXEC broken in 3.7.0
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard W.M. Jones  
View profile  
 More options Oct 8 2012, 6:10 pm
Newsgroups: linux.kernel
From: "Richard W.M. Jones" <rjo...@redhat.com>
Date: Tue, 09 Oct 2012 00:10:02 +0200
Local: Mon, Oct 8 2012 6:10 pm
Subject: F_DUPFD_CLOEXEC broken in 3.7.0

Let's move this to LKML ...

Attached is a self-contained test program that demonstrates the bug.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

  cloexec.c
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cong Wang  
View profile  
 More options Oct 9 2012, 10:10 am
Newsgroups: linux.kernel
From: Cong Wang <xiyou.wangc...@gmail.com>
Date: Tue, 09 Oct 2012 16:10:02 +0200
Local: Tues, Oct 9 2012 10:10 am
Subject: Re: F_DUPFD_CLOEXEC broken in 3.7.0
On Tue, Oct 9, 2012 at 6:05 AM, Richard W.M. Jones <rjo...@redhat.com> wrote:

Seems we passed a wrong flag to f_dupfd()...
Does the following patch help?

diff --git a/fs/fcntl.c b/fs/fcntl.c
index 8f70429..71a600a 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -258,7 +258,7 @@ static long do_fcntl(int fd, unsigned int cmd,
unsigned long arg,
                err = f_dupfd(arg, filp, 0);
                break;
        case F_DUPFD_CLOEXEC:
-               err = f_dupfd(arg, filp, FD_CLOEXEC);
+               err = f_dupfd(arg, filp, O_CLOEXEC);
                break;
        case F_GETFD:
                err = get_close_on_exec(fd) ? FD_CLOEXEC : 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard W.M. Jones  
View profile  
 More options Oct 9 2012, 10:20 am
Newsgroups: linux.kernel
From: "Richard W.M. Jones" <rjo...@redhat.com>
Date: Tue, 09 Oct 2012 16:20:02 +0200
Local: Tues, Oct 9 2012 10:20 am
Subject: Re: F_DUPFD_CLOEXEC broken in 3.7.0

Yes ..  the same patch has already been sent upstream.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »