Ubuntu-focal-kernel/block
Roman Smirnov 5c7eae3243 block: prevent division by zero in blk_rq_stat_sum()
BugLink: https://bugs.launchpad.net/bugs/2067857

[ 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>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-06-07 15:01:41 +02:00
..
partitions block/partition: fix signedness issue for Amiga partitions 2023-10-02 12:12:10 +02:00
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c block, bfq: fix null pointer dereference in bfq_bio_bfqg() 2023-02-01 15:21:20 +01:00
bfq-iosched.c
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-05-12 17:14:59 +02:00
bio.c block: prevent an integer overflow in bvec_try_merge_hw_page 2024-03-28 15:18:36 +01:00
blk-cgroup.c blk-cgroup: fix missing pd_online_fn() while activating policy 2023-03-21 10:09:01 +01:00
blk-core.c block: fix and cleanup bio_check_ro 2023-03-21 10:09:01 +01:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-iocost.c block/blk-iocost (gcc13): keep large values in a new enum 2023-09-01 14:48:40 +02:00
blk-iolatency.c
blk-lib.c
blk-map.c
blk-merge.c treewide: Remove uninitialized_var() usage 2023-08-09 12:25:41 +02:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c blk-mq: correct stale comment of .get_budget 2023-05-12 17:14:59 +02:00
blk-mq-sched.h
blk-mq-sysfs.c blk-mq: fix possible memleak when register 'hctx' failed 2023-02-01 15:23:14 +01:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: fix IO hang from sbitmap wakeup race 2024-03-28 15:18:38 +01:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c
blk-softirq.c
blk-stat.c block: prevent division by zero in blk_rq_stat_sum() 2024-06-07 15:01:41 +02:00
blk-stat.h
blk-sysfs.c
blk-throttle.c blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!" 2024-02-02 14:13:21 +01:00
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h
bounce.c
bsg-lib.c
bsg.c
cmdline-parser.c
compat_ioctl.c
elevator.c
genhd.c
ioctl.c
ioprio.c
kyber-iosched.c
mq-deadline.c
opal_proto.h block: sed-opal: handle empty atoms when parsing response 2024-06-07 15:01:23 +02:00
partition-generic.c block: unhash blkdev part inode when the part is deleted 2023-02-01 15:22:02 +01:00
scsi_ioctl.c
sed-opal.c block: sed-opal: handle empty atoms when parsing response 2024-06-07 15:01:23 +02:00
t10-pi.c