Re: [PATCH] open: make RESOLVE_CACHED correctly test for O_TMPFILE

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

 



On Sat, Aug 05, 2023 at 07:17:54PM +0200, Christian Brauner wrote:
> On Sun, 06 Aug 2023 02:11:58 +1000, Aleksa Sarai wrote:
> > O_TMPFILE is actually __O_TMPFILE|O_DIRECTORY. This means that the old
> > fast-path check for RESOLVE_CACHED would reject all users passing
> > O_DIRECTORY with -EAGAIN, when in fact the intended test was to check
> > for __O_TMPFILE.

And afaict, io_uring has the same problem in

static bool io_openat_force_async(struct io_open *open)
{
        /*
         * Don't bother trying for O_TRUNC, O_CREAT, or O_TMPFILE open,
         * it'll always -EAGAIN
         */
        return open->how.flags & (O_TRUNC | O_CREAT | O_TMPFILE);
}

always forcing O_DIRECTORY lookups to go async. So that needs another
fix.



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux