diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2020-01-12 15:49:59 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2020-01-13 12:40:17 +0100 |
commit | 57debb815459d2ef3e25aacfe355307d14b73a91 (patch) | |
tree | a2a22da1ebae1ea07c5078a679d404d88e49a3c9 /fs/udf | |
parent | 49be68c4931d9f0f171e5f01a574fc40205db2b5 (diff) | |
download | linux-stable-57debb815459d2ef3e25aacfe355307d14b73a91.tar.gz linux-stable-57debb815459d2ef3e25aacfe355307d14b73a91.tar.bz2 linux-stable-57debb815459d2ef3e25aacfe355307d14b73a91.zip |
udf: Disallow R/W mode for disk with Metadata partition
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).
Link: https://lore.kernel.org/r/20200112144959.28104-1-pali.rohar@gmail.com
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 0311c7decdd2..96d001a4a844 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; |