mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ovl: fix random return value on mount
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 <[email protected]>
Fixes: 3fe6e52f06 ("ovl: override creds with the ones from ...")
Cc: <[email protected]> # v4.7
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
This commit is contained in:
parent
f4439de118
commit
8fc646b443
1 changed files with 1 additions and 0 deletions
|
|
@ -1090,6 +1090,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_indexdir;
|
||||
|
|
|
|||
Loading…
Reference in a new issue