diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-03-29 22:10:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-24 09:34:15 +0200 |
commit | 68e3579a5fef4b45e14802808476baac5797e741 (patch) | |
tree | 99e52e117f912b53da0248657c61ba4a94e5ba23 /arch/sparc/lib/hweight.S | |
parent | ad811550b1248d19af77724b77cb83bf0ab8b5dc (diff) |
ext4: don't allow r/w mounts if metadata blocks overlap the superblock
commit 18db4b4e6fc31eda838dd1c1296d67dbcb3dc957 upstream.
If some metadata block, such as an allocation bitmap, overlaps the
superblock, it's very likely that if the file system is mounted
read/write, the results will not be pretty. So disallow r/w mounts
for file systems corrupted in this particular way.
Backport notes:
3.18.y is missing bc98a42c1f7d ("VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)")
and e462ec50cb5f ("VFS: Differentiate mount flags (MS_*) from internal superblock flags")
so we simply use the sb MS_RDONLY check from pre bc98a42c1f7d in place of the sb_rdonly
function used in the upstream variant of the patch.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sparc/lib/hweight.S')
0 files changed, 0 insertions, 0 deletions