• hujianyang's avatar
    ovl: check lowerdir amount for non-upper mount · 6be4506e
    hujianyang authored
    Recently multi-lower layer mount support allow upperdir and workdir
    to be omitted, then cause overlayfs can be mount with only one
    lowerdir directory. This action make no sense and have potential risk.
    
    This patch check the total number of lower directories to prevent
    mounting overlayfs with only one directory.
    
    Also, an error message is added to indicate lower directories exceed
    OVL_MAX_STACK limit.
    Signed-off-by: default avatarhujianyang <hujianyang@huawei.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    6be4506e
super.c 21.7 KB