[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <937AFC55-9B52-44C1-893E-CE396F1BD5B7@brauner.io>
Date: Wed, 08 May 2019 16:13:32 +0200
From: Christian Brauner <christian@...uner.io>
To: David Howells <dhowells@...hat.com>
CC: dhowells@...hat.com, viro@...iv.linux.org.uk,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: make all new mount api fds cloexec by default
On May 8, 2019 4:05:43 PM GMT+02:00, David Howells <dhowells@...hat.com> wrote:
>Christian Brauner <christian@...uner.io> wrote:
>
>> - fd = get_unused_fd_flags(flags & O_CLOEXEC);
>> + fd = get_unused_fd_flags(flags | O_CLOEXEC);
>
>That'll break if there are any flags other than O_CLOEXEC.
>
>> - ret = get_unused_fd_flags((flags & FSMOUNT_CLOEXEC) ? O_CLOEXEC :
>0);
>> + ret = get_unused_fd_flags(flags | O_CLOEXEC);
>
>That'll break because flags is not compatible with what
>get_unused_fd_flags()
>is expecting.
Technically only when new flags are added.
Right now it works correctly.
I'll send a v1 soon.
Thanks for catching that, David.
Christian
Powered by blists - more mailing lists