Re: [PATCH 3/6] fhandle: do_handle_open() should get FD with user flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 15, 2025 at 03:51:53PM +0200, Amir Goldstein wrote:
> On Fri, Aug 15, 2025 at 3:46 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
> >
> > On Fri, Aug 15, 2025 at 11:17:26AM +0200, Amir Goldstein wrote:
> > > On Fri, Aug 15, 2025 at 1:52 AM Thomas Bertschinger
> > > <tahbertschinger@xxxxxxxxx> wrote:
> > > >
> > > > In f07c7cc4684a, do_handle_open() was switched to use the automatic
> > > > cleanup method for getting a FD. In that change it was also switched
> > > > to pass O_CLOEXEC unconditionally to get_unused_fd_flags() instead
> > > > of passing the user-specified flags.
> > > >
> > > > I don't see anything in that commit description that indicates this was
> > > > intentional, so I am assuming it was an oversight.
> > > >
> > > > With this fix, the FD will again be opened with, or without, O_CLOEXEC
> > > > according to what the user requested.
> > > >
> > > > Fixes: f07c7cc4684a ("fhandle: simplify error handling")
> > > > Signed-off-by: Thomas Bertschinger <tahbertschinger@xxxxxxxxx>
> > >
> > > This patch does not seem to be conflicting with earlier patches in the series
> > > but it is still preferred to start the series with the backportable fix patch.
> > >
> > > Fee free to add:
> > > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>
> >
> > I'm kinda tempted to last let it slide because I think that's how it
> > should actually be... But ofc, we'll fix.
> 
> You mean forcing O_CLOEXEC. right?

Yes, of course. :)

> Not ignoring the rest of O_ flags...

No, I think that would be unwise. :)




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux