Re: [PATCH] udf: Disallow R/W mode for disk with Metadata partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux