ceph: strengthen rsize/wsize/readdir_max_bytes validation
authorChengguang Xu <cgxu519@gmx.com>
Wed, 30 May 2018 08:47:06 +0000 (16:47 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 4 Jun 2018 18:46:01 +0000 (20:46 +0200)
commit8db0c7596f1258b28f32a38f2d5bbc0d63c104c9
tree5849eca70bc449a8514d5eb6ad6aecf8547373a9
parentc36ed50de2ad1649ce0369a4a6fc2cc11b20dfb7
ceph: strengthen rsize/wsize/readdir_max_bytes validation

The check (intval < PAGE_SIZE) will involve type cast, so even when
specifying negative value to rsize/wsize/readdir_max_bytes, it will
pass the validation check successfully.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.c