提交 7168179f 编写于 作者: A Amir Goldstein 提交者: Miklos Szeredi

ovl: check ERR_PTR() return value from ovl_lookup_real()

Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Fixes: 06170154 ("ovl: lookup indexed ancestor of lower dir")
Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 2ca3c148
...@@ -477,8 +477,8 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb, ...@@ -477,8 +477,8 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb,
dput(upper); dput(upper);
} }
if (!this) if (IS_ERR_OR_NULL(this))
return NULL; return this;
if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) { if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) {
dput(this); dput(this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册