]> git.baikalelectronics.ru Git - kernel.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)
commit81635c7e8b8000d4e6f72484a5bc908a5b0fee0c
treeb7d1dd8992d90151862fcc6cdfdfda6c58e9084e
parent4e5cdbc15d0c4625f1a46407152fec92769819b3
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