Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

teach filename_lookup() to treat NULL filename as ""

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 5b313bcb 9852d85e

+3 -1
+3 -1
fs/namei.c
··· 588 588 unsigned seq; 589 589 } *stack, internal[EMBEDDED_LEVELS]; 590 590 struct filename *name; 591 + const char *pathname; 591 592 struct nameidata *saved; 592 593 unsigned root_seq; 593 594 int dfd; ··· 607 606 p->depth = 0; 608 607 p->dfd = dfd; 609 608 p->name = name; 609 + p->pathname = likely(name) ? name->name : ""; 610 610 p->path.mnt = NULL; 611 611 p->path.dentry = NULL; 612 612 p->total_link_count = old ? old->total_link_count : 0; ··· 2441 2439 static const char *path_init(struct nameidata *nd, unsigned flags) 2442 2440 { 2443 2441 int error; 2444 - const char *s = nd->name->name; 2442 + const char *s = nd->pathname; 2445 2443 2446 2444 /* LOOKUP_CACHED requires RCU, ask caller to retry */ 2447 2445 if ((flags & (LOOKUP_RCU | LOOKUP_CACHED)) == LOOKUP_CACHED)