diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-01-30 07:30:50 -0500 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-02-16 09:53:20 -0500 |
commit | 7168179fcf25f7812e8541decac686a91359e522 (patch) | |
tree | 995efe6939761e96a4aa0b143b1345b45d63257a | |
parent | 2ca3c148a06244d46dcfc95c5965644c83a30b37 (diff) |
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>
-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, | |||
477 | dput(upper); | 477 | dput(upper); |
478 | } | 478 | } |
479 | 479 | ||
480 | if (!this) | 480 | if (IS_ERR_OR_NULL(this)) |
481 | return NULL; | 481 | return this; |
482 | 482 | ||
483 | if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) { | 483 | if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) { |
484 | dput(this); | 484 | dput(this); |