]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ovl: fix regression in parsing of mount options with escaped comma
authorAmir Goldstein <amir73il@gmail.com>
Thu, 12 Oct 2023 13:08:28 +0000 (16:08 +0300)
committerAmir Goldstein <amir73il@gmail.com>
Thu, 12 Oct 2023 15:53:37 +0000 (18:53 +0300)
commitc34706acf40b43dd31f67c92c5a95d39666a1eb3
tree0cd2f1457a0531e6656ef557cb5ee601a04da1e6
parente001d1447cd4585d7f23a44ff668ba2bc624badb
ovl: fix regression in parsing of mount options with escaped comma

Ever since commit 91c77947133f ("ovl: allow filenames with comma"), the
following example was legit overlayfs mount options:

  mount -t overlay overlay -o 'lowerdir=/tmp/a\,b/lower' /mnt

The conversion to new mount api moved to using the common helper
generic_parse_monolithic() and discarded the specialized ovl_next_opt()
option separator.

Bring back ovl_next_opt() and use vfs_parse_monolithic_sep() to fix the
regression.

Reported-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
Closes: https://lore.kernel.org/r/8da307fb-9318-cf78-8a27-ba5c5a0aef6d@alum.mit.edu/
Fixes: 1784fbc2ed9c ("ovl: port to new mount api")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
fs/overlayfs/params.c