Skip to content
Commit 07b64558 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into do_remount



There are no races as locked mount flags are guaranteed to never change.

Moving the test into do_remount makes it more visible, and ensures all
filesystem remounts pass the MNT_LOCK_READONLY permission check.  This
second case is not an issue today as filesystem remounts are guarded
by capable(CAP_DAC_ADMIN) and thus will always fail in less privileged
mount namespaces, but it could become an issue in the future.

Cc: stable@vger.kernel.org
Acked-by: default avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent a6138db8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment