This is a note to let you know that I've just added the patch titled ovl: pass string to ovl_parse_layer() to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ovl-pass-string-to-ovl_parse_layer.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 3094e5e9ed34536d42979e22456b7297ed6e1715 Author: Christian Brauner <brauner@xxxxxxxxxx> Date: Fri Jul 5 09:15:08 2024 +0800 ovl: pass string to ovl_parse_layer() [ Upstream commit 7eff3453cbd7e0bfc7524d59694119b5ca844778 ] So it can be used for parsing the Opt_lowerdir. Signed-off-by: Zhihao Cheng <chengzhihao1@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240705011510.794025-2-chengzhihao1@xxxxxxxxxx Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> Stable-dep-of: ca76ac36bb60 ("ovl: fix wrong lowerdir number check for parameter Opt_lowerdir") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c index 488f920f79d28..17b9c1838182d 100644 --- a/fs/overlayfs/params.c +++ b/fs/overlayfs/params.c @@ -369,10 +369,9 @@ static void ovl_add_layer(struct fs_context *fc, enum ovl_opt layer, } } -static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param, - enum ovl_opt layer) +static int ovl_parse_layer(struct fs_context *fc, const char *layer_name, enum ovl_opt layer) { - char *name = kstrdup(param->string, GFP_KERNEL); + char *name = kstrdup(layer_name, GFP_KERNEL); bool upper = (layer == Opt_upperdir || layer == Opt_workdir); struct path path; int err; @@ -586,7 +585,7 @@ static int ovl_parse_param(struct fs_context *fc, struct fs_parameter *param) case Opt_datadir_add: case Opt_upperdir: case Opt_workdir: - err = ovl_parse_layer(fc, param, opt); + err = ovl_parse_layer(fc, param->string, opt); break; case Opt_default_permissions: config->default_permissions = true;