lkml.org 
[lkml]   [2019]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] fs: make all new mount api fds cloexec by default
Date
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

\
 
 \ /
  Last update: 2019-05-08 16:07    [W:0.049 / U:2.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site