mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][linux-next] fs: Fix lookup_flags in vfs_statx()
@ 2022-02-25  0:17 Steven Rostedt
  2022-02-25  0:27 ` Steven Rostedt
  2022-02-25  1:37 ` Stefan Roesch
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-02-25  0:17 UTC (permalink / raw)
  To: LKML, linux-fsdevel; +Cc: Alexander Viro, Stefan Roesch, Jens Axboe

From: Steven Rostedt (Google) <rostedt@goodmis.org>

I needed to test Linux next and it locked up at starting init.

I bisected it down to:

30512d54fae35 ("fs: replace const char* parameter in vfs_statx and do_statx with struct filename")
1e0561928e3ab ("io-uring: Copy path name during prepare stage for statx")

The first commit did not even compile, so I consider the two of the them
the same commit.

Looking at what was changed, I see that the lookup_flags were removed from
the filename_lookup() in the vfs_statx() function, and that the
lookup_flags that were used later on in the function, were never properly
updated either.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
diff --git a/fs/stat.c b/fs/stat.c
index f0a9702cee67..2a2132670929 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -217,7 +217,7 @@ static int vfs_statx(int dfd, struct filename
*filename, int flags, struct kstat *stat, u32 request_mask)
 {
 	struct path path;
-	unsigned lookup_flags = 0;
+	unsigned lookup_flags = getname_statx_lookup_flags(flags);
 	int error;
 
 	if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
AT_EMPTY_PATH | @@ -225,7 +225,7 @@ static int vfs_statx(int dfd, struct
filename *filename, int flags, return -EINVAL;
 
 retry:
-	error = filename_lookup(dfd, filename, flags, &path, NULL);
+	error = filename_lookup(dfd, filename, lookup_flags, &path, NULL);
 	if (error)
 		goto out;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-25  1:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25  0:17 [PATCH][linux-next] fs: Fix lookup_flags in vfs_statx() Steven Rostedt
2022-02-25  0:27 ` Steven Rostedt
2022-02-25  1:37 ` Stefan Roesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®