]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: don't allow negative ->write_io_size_bits
authorChao Yu <yuchao0@huawei.com>
Thu, 14 Feb 2019 16:16:15 +0000 (00:16 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 6 Mar 2019 03:58:06 +0000 (19:58 -0800)
commita98bacd62084d916be58216fb365a536da62c44b
treeea98d979f4b41968eb88479e82776ad833338851
parent66129d53fd979e77dc1fa07b6c74c7c42ecd309a
f2fs: don't allow negative ->write_io_size_bits

As Dan reported:

"We put an upper bound on ->write_io_size_bits but we don't have a lower
bound."

So let's add lower bound check for ->write_io_size_bits in parse_options().

[We don't allow configuring ->write_io_size_bits to zero, since at least
we need to fill one dummy page for aligned IO.]

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c