mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 02:33:57 +00:00
blk-iocost: check return value of match_u64()
This patch fixs that the return value of match_u64() from ioc_qos_write() is not checked, Signed-off-by: Yu Kuai <yukuai3@huawei.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20230117070806.3857142-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
5f2779dfa7
commit
7b7c5ae440
@ -3214,7 +3214,8 @@ static ssize_t ioc_qos_write(struct kernfs_open_file *of, char *input,
|
|||||||
|
|
||||||
switch (match_token(p, qos_ctrl_tokens, args)) {
|
switch (match_token(p, qos_ctrl_tokens, args)) {
|
||||||
case QOS_ENABLE:
|
case QOS_ENABLE:
|
||||||
match_u64(&args[0], &v);
|
if (match_u64(&args[0], &v))
|
||||||
|
goto einval;
|
||||||
enable = v;
|
enable = v;
|
||||||
continue;
|
continue;
|
||||||
case QOS_CTRL:
|
case QOS_CTRL:
|
||||||
|
Loading…
Reference in New Issue
Block a user