diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-01-30 13:30:50 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-02-16 15:53:20 +0100 |
commit | 7168179fcf25f7812e8541decac686a91359e522 (patch) | |
tree | 995efe6939761e96a4aa0b143b1345b45d63257a /fs | |
parent | ovl: check lower ancestry on encode of lower dir file handle (diff) | |
download | linux-7168179fcf25f7812e8541decac686a91359e522.tar.xz linux-7168179fcf25f7812e8541decac686a91359e522.zip |
ovl: check ERR_PTR() return value from ovl_lookup_real()
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 061701540349 ("ovl: lookup indexed ancestor of lower dir")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/export.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index 9df455ca59a8..97a916ea8b86 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -477,8 +477,8 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb, dput(upper); } - if (!this) - return NULL; + if (IS_ERR_OR_NULL(this)) + return this; if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) { dput(this); |