diff options
| author | Roman Smirnov <r.smirnov@omp.ru> | 2024-03-05 16:45:09 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-13 13:07:37 +0200 |
| commit | 5f7fd6aa4c4877d77133ea86c14cf256f390b2fe (patch) | |
| tree | 932ff9d77eda22d9fa77de8b22fff41d6e571e11 /include/uapi/linux | |
| parent | 0662deae8bb88758b5d3edef2e950a674079ba2c (diff) | |
block: prevent division by zero in blk_rq_stat_sum()
[ Upstream commit 93f52fbeaf4b676b21acfe42a5152620e6770d02 ]
The expression dst->nr_samples + src->nr_samples may
have zero value on overflow. It is necessary to add
a check to avoid division by zero.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/20240305134509.23108-1-r.smirnov@omp.ru
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
