Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] path_pts: missing check for d_hash_and_lookup()
@ 2020-06-07 15:00 Vasily Averin
0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2020-06-07 15:00 UTC (permalink / raw)
To: linux-fsdevel; +Cc: Alexander Viro
Parent dentry can be located on any file system
therefore d_hash_and_lookup() can return ERR_PTR
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/namei.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/namei.c b/fs/namei.c
index a320371899cf..6c97599f307b 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2616,6 +2616,8 @@ int path_pts(struct path *path)
dput(path->dentry);
path->dentry = parent;
child = d_hash_and_lookup(parent, &this);
+ if (IS_ERR(child))
+ return PTR_ERR(child);
if (!child)
return -ENOENT;
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-07 15:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 15:00 [PATCH] path_pts: missing check for d_hash_and_lookup() Vasily Averin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).