Skip to contentSkip to conversation

FAILED: patch "[PATCH] ovl: fix random return value on mount" failed to apply to 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jul 25, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 8fc646b44385ff0a9853f6590497e43049eeb311 Mon Sep 17 00:00:00 2001

From: Amir Goldstein <[email protected]>
Date: Tue, 11 Jul 2017 15:58:35 +0300
Subject: [PATCH] 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.

Fixes 3fe6e52f0626 ("ovl: override creds with the ones from ...")
Cc <[email protected]> # v4.7
fs/overlayfs/super.c +1 -0
index 44dc2d6ffe0f..1cf5d3538309 100644
@@ -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;