]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ovl: check lowerdir amount for non-upper mount
authorhujianyang <hujianyang@huawei.com>
Thu, 15 Jan 2015 05:19:21 +0000 (13:19 +0800)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 18 Mar 2015 09:29:47 +0000 (10:29 +0100)
commit6be4506e34cf6075a1307b646e0a6c46c1c9010d
treeb7d1dd8992d90151862fcc6cdfdfda6c58e9084e
parentbead55ef775f6e25a8d286c0d47030580f577bec
ovl: check lowerdir amount for non-upper mount

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: hujianyang <hujianyang@huawei.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/overlayfs/super.c