• Pavel Emelyanov's avatar
    mnt: Fix validation of dumpable mountpoints · 30e95be2
    Pavel Emelyanov authored
    This patch consists of 3 unsplittable (from my POV) fixes.
    
    1. Remove messy check from dump_one_mountpoint() -- we have
       validate_mounts to check whether we can dump the tree
       or not.
    
    2. Other than being in the wron place the mentioned check
       is wrong. Comparing of the length of the mp->source-s
       makes no sense -- it should be mp->root, but even this
       would be wrong...
    
    3. ... instead, we should check for bind mount root path
       being accessible from the target mount root path, i.e.
       the bind->root should start with src->root.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
    30e95be2
mount.c 40.9 KB