mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
ovl: fix random return value on mount
commit8fc646b443
upstream. On failure to prepare_creds(), mount fails with a random return value, as err was last set to an integer cast of a valid lower mnt pointer or set to 0 if inodes index feature is enabled. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes:3fe6e52f06
("ovl: override creds with the ones from ...") Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5cf84432b4
commit
97de6f34b4
|
@ -1310,6 +1310,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
|||
else
|
||||
sb->s_d_op = &ovl_dentry_operations;
|
||||
|
||||
err = -ENOMEM;
|
||||
ufs->creator_cred = cred = prepare_creds();
|
||||
if (!cred)
|
||||
goto out_put_lower_mnt;
|
||||
|
|
Loading…
Reference in New Issue
Block a user