Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] fs: make all new mount api fds cloexec by default | Date | Wed, 08 May 2019 15:05:43 +0100 |
| |
Christian Brauner <christian@brauner.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.
David
| |