ovl: check ERR_PTR() return value from ovl_lookup_real()
Amir Goldstein
maintainerPATCH 1/1 ovl: check ERR_PTR() return value from ovl_lookup_real()
---
Miklos,
Another fix, for yet another issue reported by 0-day robot. At least it looks like the smatch checker got to the last patch ;-).
All 3 fixes over overlayfs-next are push to branch ovl-nfs-export on my github.
Thanks,
Amir.
fs/overlayfs/export.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/overlayfs/export.c +2 -2
@@ -355,8 +355,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);
Signature · 1 line
2.7.4
Amir Goldstein
maintainerQuoted 8 lines · Amir Goldstein
Reported-by Dan Carpenter <[email protected]>Fixes 061701540349 ("ovl: lookup indexed ancestor of lower dir")Signed-off-by Amir Goldstein <[email protected]>---
Miklos,Another fix, for yet another issue reported by 0-day robot. At least it looks like the smatch checker got to the last patch ;-).
Miklos,
I guess you missed this patch when updated for-linus, because subject looks very similar the the "other" 0-day reported bug fix?
Quoted 4 lines
All 3 fixes over overlayfs-next are push to branch ovl-nfs-export on my github.
At this time, my ovl-nfs-export is rebased on current master and has all the patches that are candidates for rc2 (including this fix). The branch also contains "hash by file handle" work, which is now complete. Will be posting it shortly.
Thanks,
Amir.
Quoted 22 lines
fs/overlayfs/export.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/overlayfs/export.c +2
-3@@ -355,8 +355,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); --2.7.4