Thread (72 messages) 72 messages, 8 authors, 2021-07-07

Re: [PATCH RFC 2/3] lib/vsprintf.c: make %pD print full path for file

From: Sergey Senozhatsky <senozhatsky@chromium.org>
Date: 2021-05-10 03:46:36
Also in: linux-fsdevel, linux-s390, lkml

On (21/05/08 20:25), Jia He wrote:
quoted hunk ↗ jump to hunk
+++ b/lib/vsprintf.c
@@ -27,6 +27,7 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <linux/kernel.h>
+#include <linux/dcache.h>
 #include <linux/kallsyms.h>
 #include <linux/math64.h>
 #include <linux/uaccess.h>
@@ -923,10 +924,17 @@ static noinline_for_stack
 char *file_dentry_name(char *buf, char *end, const struct file *f,
 			struct printf_spec spec, const char *fmt)
 {
+	const struct path *path = &f->f_path;
+	char *p;
+	char tmp[128];
This doesn't look ideal. Why 128 bytes and why on the stack?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help