[PATCH] path_pts: missing check for d_hash_and_lookup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Parent dentry can be located on any file system
therefore d_hash_and_lookup() can return ERR_PTR

Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux