mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: Baolin Liu <liubaolin12138@163.com>, <ethan.ferguson@zetier.com>
Cc: <ntfs3@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	Baolin Liu <liubaolin@kylinos.cn>
Subject: Re: [PATCH] fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts
Date: Wed, 16 Sep 2026 13:09:01 +0200	[thread overview]
Message-ID: <d7d933d4-11ad-43db-88e8-659f4c98afc9@paragon-software.com> (raw)
In-Reply-To: <20260630005955.1374688-1-liubaolin12138@163.com>

On 6/30/26 02:59, Baolin Liu wrote:

> From: Baolin Liu <liubaolin@kylinos.cn>
>
> FS_IOC_SETFSLABEL does not check for readonly mounts and
> can report success without persisting the label change.
>
> Return -EROFS on readonly mounts.
>
> Fixes: 21dc07ac9c25 ("ntfs3: add FS_IOC_SETFSLABEL ioctl")
> Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
> ---
>   fs/ntfs3/file.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
> index b041639ab406..f43baa46ec5c 100644
> --- a/fs/ntfs3/file.c
> +++ b/fs/ntfs3/file.c
> @@ -105,6 +105,9 @@ static int ntfs_ioctl_set_volume_label(struct ntfs_sb_info *sbi, u8 __user *buf)
>   	if (!capable(CAP_SYS_ADMIN))
>   		return -EPERM;
>   
> +	if (sb_rdonly(sbi->sb))
> +		return -EROFS;
> +
>   	if (copy_from_user(user, buf, FSLABEL_MAX))
>   		return -EFAULT;
>   

Hello,

Sorry for the delay.
Your patch was applied, thanks.

Regards,
Konstantin


      parent reply	other threads:[~2026-09-16 11:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30  0:59 Baolin Liu
2026-06-30  1:07 ` liubaolin
2026-09-16 11:09 ` Konstantin Komarov [this message]

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=d7d933d4-11ad-43db-88e8-659f4c98afc9@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=ethan.ferguson@zetier.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liubaolin12138@163.com \
    --cc=liubaolin@kylinos.cn \
    --cc=ntfs3@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®