linux-stable/block
Roman Smirnov edd073c78d block: prevent division by zero in blk_rq_stat_sum()
[ Upstream commit 93f52fbeaf ]

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-04-13 12:51:38 +02:00
..
partitions block/partition: fix signedness issue for Amiga partitions 2023-07-27 08:37:29 +02:00
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c block, bfq: fix null pointer dereference in bfq_bio_bfqg() 2022-12-08 11:22:57 +01:00
bfq-iosched.c block, bfq: protect 'bfqd->queued' by 'bfqd->lock' 2022-11-10 17:57:54 +01:00
bfq-iosched.h bfq: Get rid of __bio_blkcg() usage 2022-06-14 18:11:50 +02:00
bfq-wf2q.c bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bio-integrity.c block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-03-11 16:43:35 +01:00
bio.c block: prevent an integer overflow in bvec_try_merge_hw_page 2024-02-23 08:24:59 +01:00
blk-cgroup.c blk-cgroup: fix missing pd_online_fn() while activating policy 2023-02-06 07:52:48 +01:00
blk-core.c block: fix and cleanup bio_check_ro 2023-02-06 07:52:47 +01:00
blk-exec.c
blk-flush.c block: Fix fsync always failed if once failed 2022-03-08 19:07:47 +01:00
blk-integrity.c
blk-ioc.c block: Fix use-after-free issue accessing struct io_cq 2020-04-17 10:50:04 +02:00
blk-iocost.c block/blk-iocost (gcc13): keep large values in a new enum 2023-06-14 10:59:54 +02:00
blk-iolatency.c blk-iolatency: Fix inflight count imbalances and IO hangs on offline 2022-06-14 18:11:49 +02:00
blk-lib.c
blk-map.c
blk-merge.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created 2022-08-25 11:17:36 +02:00
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-03-11 16:43:34 +01:00
blk-mq-sched.h block: only call sched requeue_request() for scheduled requests 2020-09-23 12:40:37 +02:00
blk-mq-sysfs.c blk-mq: fix possible memleak when register 'hctx' failed 2023-01-18 11:41:38 +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-02-23 08:25:03 +01:00
blk-mq.h
blk-pm.c scsi: block: Fix a race in the runtime power management code 2021-01-06 14:48:37 +01:00
blk-pm.h
blk-rq-qos.c rq-qos: fix missed wake-ups in rq_qos_throttle try two 2021-07-19 08:53:16 +02:00
blk-rq-qos.h block: fix race between adding/removing rq qos and normal IO 2021-07-14 16:53:18 +02:00
blk-settings.c blk-settings: align max_sectors on "logical_block_size" boundary 2021-03-04 10:26:40 +01:00
blk-softirq.c
blk-stat.c block: prevent division by zero in blk_rq_stat_sum() 2024-04-13 12:51:38 +02:00
blk-stat.h
blk-sysfs.c block: don't delete queue kobject before its children 2022-04-15 14:18:05 +02:00
blk-throttle.c blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!" 2023-12-20 15:41:20 +01:00
blk-timeout.c
blk-wbt.c blk-wbt: make sure throttle is enabled properly 2021-07-14 16:53:25 +02:00
blk-wbt.h blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled() 2021-07-14 16:53:25 +02:00
blk-zoned.c blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN 2021-09-22 12:26:19 +02:00
blk.h
bounce.c
bsg-lib.c
bsg.c scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND 2021-09-22 12:26:23 +02:00
cmdline-parser.c
compat_ioctl.c block/compat_ioctl: fix range check in BLKGETSIZE 2022-04-27 13:50:50 +02:00
elevator.c block: return ELEVATOR_DISCARD_MERGE if possible 2022-05-25 09:14:38 +02:00
genhd.c block: Suppress uevent for hidden device when removed 2021-03-30 14:35:23 +02:00
ioctl.c
ioprio.c block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2) 2021-12-14 14:49:02 +01:00
kyber-iosched.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
mq-deadline.c block: return ELEVATOR_DISCARD_MERGE if possible 2022-05-25 09:14:38 +02:00
opal_proto.h block: sed-opal: handle empty atoms when parsing response 2024-03-26 18:22:12 -04:00
partition-generic.c block: unhash blkdev part inode when the part is deleted 2022-12-19 12:24:16 +01:00
scsi_ioctl.c
sed-opal.c block: sed-opal: handle empty atoms when parsing response 2024-03-26 18:22:12 -04:00
t10-pi.c