kernel_samsung_a53x/block
Roman Smirnov 531f682d48 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>
2024-11-19 09:23:14 +01:00
..
partitions Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
badblocks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bfq-cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bfq-iosched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bfq-iosched.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bfq-wf2q.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bio-integrity.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bio.c block: prevent an integer overflow in bvec_try_merge_hw_page 2024-11-18 12:13:14 +01:00
blk-cgroup-rwstat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-cgroup-rwstat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-crypto-fallback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-crypto-internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-crypto.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-exec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-flush.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-integrity.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-ioc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-iocost.c blk-iocost: Fix an UBSAN shift-out-of-bounds warning 2024-11-18 12:13:26 +01:00
blk-iolatency.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-ioprio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-ioprio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-map.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-merge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-cpumap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-debugfs-zoned.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-debugfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-sched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-sched.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-tag.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-tag.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq-virtio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-mq.c blk-mq: fix IO hang from sbitmap wakeup race 2024-11-18 12:13:20 +01:00
blk-mq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-pm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-rq-qos.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-rq-qos.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-sec-stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-settings.c block: Clear zone limits for a non-zoned stacked queue 2024-11-19 09:22:16 +01:00
blk-stat.c block: prevent division by zero in blk_rq_stat_sum() 2024-11-19 09:23:14 +01:00
blk-stat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-sysfs.c block: introduce zone_write_granularity limit 2024-11-19 09:22:16 +01:00
blk-throttle.c blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!" 2024-11-18 12:11:56 +01:00
blk-timeout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-wbt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-wbt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk-zoned.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blk.h blk: disable IO_STAT completely 2024-11-17 17:42:57 +01:00
bounce.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bsg-lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bsg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cmdline-parser.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elevator.c Revert "block: Do not allow boosters to adjusting scheduler" 2024-11-17 20:45:13 +01:00
genhd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioctl.c block: add check that partition length needs to be aligned with block size 2024-11-19 09:22:46 +01:00
ioprio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.iosched Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyslot-manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kyber-iosched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mq-deadline-cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mq-deadline-cgroup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mq-deadline-main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opal_proto.h block: sed-opal: handle empty atoms when parsing response 2024-11-19 08:44:36 +01:00
scsi_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sed-opal.c block: sed-opal: handle empty atoms when parsing response 2024-11-19 08:44:36 +01:00
ssg-cgroup.c ssg: Set max available ratio to 25 2024-11-17 17:41:50 +01:00
ssg-cgroup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ssg-iosched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
t10-pi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00