Commit e652b754 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Zhong Jinghua
Browse files

nbd: validate the block size in nbd_set_size

mainline inclusion
from mainline-v5.1-rc1
commit dcbddf54
category: bugfix
bugzilla: 188268
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dcbddf541f18e367ac9cdad8e223d382cd303161



----------------------------------------

Move the validation of the block from the callers into nbd_set_size.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarZhong Jinghua <zhongjinghua@huawei.com>
Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
parent 629cdf07
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment