linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] udf: Disallow R/W mode for disk with Metadata partition
Date: Mon, 13 Jan 2020 12:40:42 +0100	[thread overview]
Message-ID: <20200113114042.GC23642@quack2.suse.cz> (raw)
In-Reply-To: <20200112144959.28104-1-pali.rohar@gmail.com>

On Sun 12-01-20 15:49:59, Pali Rohár wrote:
> Currently we do not support writing to UDF disks with Metadata partition.
> There is already check that disks with declared minimal write revision to
> UDF 2.50 or higher are mounted only in R/O mode but this does not cover
> situation when minimal write revision is set incorrectly (e.g. to 2.01).
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Yeah, right. Better be cautious. I've added the patch to my tree.

								Honza

> ---
>  fs/udf/super.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index 8c28e93e9..3b7073c2f 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -1063,7 +1063,8 @@ static int check_partition_desc(struct super_block *sb,
>  		goto force_ro;
>  
>  	if (map->s_partition_type == UDF_VIRTUAL_MAP15 ||
> -	    map->s_partition_type == UDF_VIRTUAL_MAP20)
> +	    map->s_partition_type == UDF_VIRTUAL_MAP20 ||
> +	    map->s_partition_type == UDF_METADATA_MAP25)
>  		goto force_ro;
>  
>  	return 0;
> -- 
> 2.20.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2020-01-13 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-12 14:49 [PATCH] udf: Disallow R/W mode for disk with Metadata partition Pali Rohár
2020-01-13 11:40 ` Jan Kara [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=20200113114042.GC23642@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pali.rohar@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).