ovl: potential Oops in ovl_rename()
Subsystems (2)
PATCH 1/1 ovl: potential Oops in ovl_rename()
We can't do a "goto out_dput;" because "newdentry" isn't initialized yet.
Fixes 02cac3227a28 ("ovl: mark upper dir with type origin entries "impure"")
Signed-off-by Dan Carpenter <[email protected]>
fs/overlayfs/dir.c +2 -2
@@ -973,13 +973,13 @@ static int ovl_rename(struct inode *olddir, struct dentry *old,if (ovl_type_origin (old) && !ovl_type_merge (new->d_parent)) { err =ovl_set_impure (new->d_parent, new_upperdir);if (err) - goto out_dput; + goto out_revert_creds; }if (!overwrite &&ovl_type_origin (new) && !ovl_type_merge (old->d_parent)) { err =ovl_set_impure (old->d_parent, old_upperdir);if (err) - goto out_dput; + goto out_revert_creds; } }
Amir Goldstein
maintainerQuoted 3 lines · Dan Carpenter
We can't do a "goto
out_dput;" because "newdentry" isn't initialized yet.
Right. copy&paste typo.
Already posted a fix yesterday ("ovl: fix wrong error handling of ovl_set_impure()")
Thanks!