diff options
author | 2024-03-05 16:45:09 +0300 | |
---|---|---|
committer | 2024-03-06 08:31:54 -0700 | |
commit | 93f52fbeaf4b676b21acfe42a5152620e6770d02 (patch) | |
tree | a88d2800745928881702da81773690cc54950722 /scripts/gdb/linux/utils.py | |
parent | drbd: atomically update queue limits in drbd_reconsider_queue_parameters (diff) | |
download | linux-rng-93f52fbeaf4b676b21acfe42a5152620e6770d02.tar.xz linux-rng-93f52fbeaf4b676b21acfe42a5152620e6770d02.zip |
block: prevent division by zero in blk_rq_stat_sum()
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>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions