Skip to content
  • Eric W. Biederman's avatar
    mount: Retest MNT_LOCKED in do_umount · 25d202ed
    Eric W. Biederman authored
    
    
    It was recently pointed out that the one instance of testing MNT_LOCKED
    outside of the namespace_sem is in ksys_umount.
    
    Fix that by adding a test inside of do_umount with namespace_sem and
    the mount_lock held.  As it helps to fail fails the existing test is
    maintained with an additional comment pointing out that it may be racy
    because the locks are not held.
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
    Fixes: 5ff9d8a6
    
     ("vfs: Lock in place mounts from more privileged users")
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    25d202ed