md/raid10: fix wrong setting of max_corr_read_errors
authorLi Nan <linan122@huawei.com>
Mon, 22 May 2023 07:25:34 +0000 (15:25 +0800)
committerSong Liu <song@kernel.org>
Tue, 13 Jun 2023 22:13:22 +0000 (15:13 -0700)
commitf8b20a405428803bd9881881d8242c9d72c6b2b2
tree37510d78af1867c1914d69411cfd8a77fb11e308
parent6beb489b2eed25978523f379a605073f99240c50
md/raid10: fix wrong setting of max_corr_read_errors

There is no input check when echo md/max_read_errors and overflow might
occur. Add check of input number.

Fixes: 1e50915fe0bb ("raid: improve MD/raid10 handling of correctable read errors.")
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230522072535.1523740-3-linan666@huaweicloud.com
drivers/md/md.c