All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: lan@suse.com
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH v2] common/rc: fix mount options quoting in _mount
Date: Wed, 1 Jul 2026 09:34:46 -0700	[thread overview]
Message-ID: <20260701163446.GC6517@frogsfrogsfrogs> (raw)
In-Reply-To: <20260701061413.10531-1-lan@suse.com>

On Wed, Jul 01, 2026 at 02:14:07PM +0800, lan@suse.com wrote:
> From: An Long <lan@suse.com>
> 
> In commit 078f320 ("treewide: convert all $MOUNT_PROG to _mount"),
> direct calls to $MOUNT_PROG were converted to call the helper function
> _mount.
> However, the _mount helper was implemented using `$*` instead of `"$@"`.
> This unquoted argument expansion triggers word splitting on any arguments
> containing spaces (such as the overlay mount options containing spaces in
> tests `overlay/083` and `overlay/086`), causing the mount to fail with
> "mount: bad usage".
> Fix this regression by using `"$@"` in the _mount helper, which correctly
> preserves argument boundaries exactly as they were provided by the caller.
> 
> Signed-off-by: An Long <lan@suse.com>
> ---
> v2: Revert the error log to "$*"

Very good!
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 79189e7e..b9a07324 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -296,7 +296,7 @@ _has_dmesg_since_option()
>  
>  _mount()
>  {
> -	$MOUNT_PROG $*
> +	$MOUNT_PROG "$@"
>  	ret=$?
>  	if [ "$ret" -ne 0 ]; then
>  		echo "\"$MOUNT_PROG $*\" failed at $(date)" >> "$seqres.mountfail?"
> -- 
> 2.51.0
> 
> 

  reply	other threads:[~2026-07-01 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 13:29 [PATCH] common/rc: fix mount options quoting in _mount lan
2026-06-29 15:58 ` Darrick J. Wong
2026-07-01  6:14   ` [PATCH v2] " lan
2026-07-01 16:34     ` Darrick J. Wong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-01 14:48 lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260701163446.GC6517@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=lan@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.