open: make RESOLVE_CACHED correctly test for O_TMPFILE
stable inclusion from stable-v5.10.190 commit c9c78b91c7834de6e4ae49392c3177608bcd47ab category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8JN4Q?from=project-issue Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9c78b91c7834de6e4ae49392c3177608bcd47ab -------------------------------- commit a0fc452a upstream. 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. Cc: stable@vger.kernel.org # v5.12+ Fixes: 99668f61 ("fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED") Signed-off-by:Aleksa Sarai <cyphar@cyphar.com> Message-Id: <20230806-resolve_cached-o_tmpfile-v1-1-7ba16308465e@cyphar.com> Signed-off-by:
Christian Brauner <brauner@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Zizhi Wo <wozizhi@huawei.com>
Loading
Please sign in to comment