linux/block
Mikulas Patocka ad6bf88a6c block: fix an integer overflow in logical block size
Logical block size has type unsigned short. That means that it can be at
most 32768. However, there are architectures that can run with 64k pages
(for example arm64) and on these architectures, it may be possible to
create block devices with 64k block size.

For exmaple (run this on an architecture with 64k pages):

Mount will fail with this error because it tries to read the superblock using 2-sector
access:
  device-mapper: writecache: I/O is not aligned, sector 2, size 1024, block size 65536
  EXT4-fs (dm-0): unable to read superblock

This patch changes the logical block size from unsigned short to unsigned
int to avoid the overflow.

Cc: stable@vger.kernel.org
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-15 21:43:09 -07:00
..
partitions
badblocks.c
bfq-cgroup.c bfq-iosched: Ensure bio->bi_blkg is valid before using it 2019-12-05 07:10:09 -07:00
bfq-iosched.c for-5.5/block-20191121 2019-11-25 10:59:41 -08:00
bfq-iosched.h block,bfq: Skip tracing hooks if possible 2019-11-20 16:10:29 -07:00
bfq-wf2q.c
bio-integrity.c block: fix memleak of bio integrity data 2019-12-05 11:38:36 -07:00
bio.c fs: move guard_bio_eod() after bio_set_op_attrs 2020-01-09 08:16:12 -07:00
blk-cgroup-rwstat.c blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT 2019-11-07 12:28:13 -07:00
blk-cgroup-rwstat.h blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT 2019-11-07 12:28:13 -07:00
blk-cgroup.c blk-cgroup: remove blkcg_drain_queue 2019-12-12 09:26:55 -07:00
blk-core.c block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT 2019-12-17 09:01:43 -07:00
blk-exec.c block: account statistics for passthrough requests 2019-10-10 17:52:31 -06:00
blk-flush.c block: Fix a lockdep complaint triggered by request queue flushing 2019-12-20 11:52:01 -07:00
blk-integrity.c block: centralize PI remapping logic to the block layer 2019-09-17 20:03:49 -06:00
blk-ioc.c
blk-iocost.c iocost: over-budget forced IOs should schedule async delay 2019-12-16 16:10:17 -07:00
blk-iolatency.c
blk-lib.c
blk-map.c block: fix memleak when __blk_rq_map_user_iov() is failed 2019-12-20 11:52:01 -07:00
blk-merge.c block: fix get_max_segment_size() overflow on 32bit arch 2020-01-14 13:37:40 -07: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: move lockdep_assert_held() into elevator_exit 2019-09-26 00:45:05 -06:00
blk-mq-sched.h
blk-mq-sysfs.c blk-mq: make sure that line break can be printed 2019-11-04 07:14:10 -07:00
blk-mq-tag.c blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() 2019-11-13 12:50:38 -07:00
blk-mq-tag.h blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() 2019-11-13 12:50:38 -07:00
blk-mq-virtio.c
blk-mq.c blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() 2019-11-13 12:50:38 -07:00
blk-mq.h blk-mq: Inline status checkers 2019-10-07 08:31:59 -06:00
blk-pm.c
blk-pm.h
blk-rq-qos.c blk-wbt: fix performance regression in wbt scale_up/scale_down 2019-10-06 09:26:41 -06:00
blk-rq-qos.h blk-rq-qos: fix first node deletion of rq_qos_del() 2019-10-15 10:13:13 -06:00
blk-settings.c block: fix an integer overflow in logical block size 2020-01-15 21:43:09 -07:00
blk-softirq.c block: Don't disable interrupts in trigger_softirq() 2019-11-18 07:29:22 -07:00
blk-stat.c blk-stat: Optimise blk_stat_add() 2019-10-07 21:19:10 -06:00
blk-stat.h
blk-sysfs.c block: Remove "dying" checks from sysfs callbacks 2019-10-07 08:31:59 -06:00
blk-throttle.c blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT 2019-11-07 12:28:13 -07:00
blk-timeout.c
blk-wbt.c blk-wbt: fix performance regression in wbt scale_up/scale_down 2019-10-06 09:26:41 -06:00
blk-wbt.h
blk-zoned.c block: set the zone size in blk_revalidate_disk_zones atomically 2019-12-03 10:18:22 -07:00
blk.h block: Fix a lockdep complaint triggered by request queue flushing 2019-12-20 11:52:01 -07:00
bounce.c
bsg-lib.c block: Fix the type of 'sts' in bsg_queue_rq() 2019-12-20 11:52:01 -07:00
bsg.c
cmdline-parser.c
compat_ioctl.c compat_ioctl: block: handle Persistent Reservations 2019-12-21 07:26:56 -07:00
elevator.c Merge branch 'for-linus' into for-5.5/block 2019-11-07 12:27:19 -07:00
genhd.c block: add iostat counters for flush requests 2019-11-21 09:06:47 -07:00
ioctl.c block: simplify blkdev_nr_zones 2019-12-03 08:51:24 -07:00
ioprio.c
Kconfig blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT 2019-11-07 12:28:13 -07:00
Kconfig.iosched blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT 2019-11-07 12:28:13 -07:00
kyber-iosched.c
Makefile blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT 2019-11-07 12:28:13 -07:00
mq-deadline.c
opal_proto.h block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64' 2019-11-18 09:49:15 -07:00
partition-generic.c for-5.5/disk-revalidate-20191122 2019-11-25 11:37:01 -08:00
scsi_ioctl.c compat_ioctl: reimplement SG_IO handling 2019-10-23 17:23:46 +02:00
sed-opal.c block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64' 2019-11-18 09:49:15 -07:00
t10-pi.c block: Fix three kernel-doc warnings 2019-10-07 08:31:59 -06:00