android_kernel_samsung_a7y1.../drivers/md
Mikulas Patocka 40a3faec8c block: fix an integer overflow in logical block size
commit ad6bf88a6c19a39fb3b0045d78ea880325dfcf15 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:37:29 +02:00
..
bcache bcache: at least try to shrink 1 node in bch_mca_scan() 2020-04-07 13:23:22 +02:00
persistent-data dm btree: increase rebalance threshold in __rebalance2() 2020-04-07 13:12:55 +02:00
alta_bigdata.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bitmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bitmap.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-android-verity.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-android-verity.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-bio-prison.c dm: Use kzalloc for all structs with embedded biosets/mempools 2020-04-07 09:27:22 +02:00
dm-bio-prison.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-bio-record.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-bufio.c Revert "dm bufio: fix deadlock with loop device" 2020-04-06 20:53:42 +02:00
dm-bufio.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-builtin.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-block-types.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-metadata.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-metadata.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-policy-cleaner.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-policy-internal.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-policy-mq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-policy-smq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-policy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-policy.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-cache-target.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-crypt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-delay.c dm delay: fix a crash when invalid device is specified 2020-04-06 18:14:27 +02:00
dm-dirty.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-era-target.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-exception-store.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-exception-store.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-flakey.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-io.c dm: Use kzalloc for all structs with embedded biosets/mempools 2020-04-07 09:27:22 +02:00
dm-ioctl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-kcopyd.c dm: Use kzalloc for all structs with embedded biosets/mempools 2020-04-07 09:27:22 +02:00
dm-linear.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-log-userspace-base.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-log-userspace-transfer.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-log-userspace-transfer.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-log-writes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-log.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-mpath.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-mpath.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-path-selector.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-path-selector.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-queue-length.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-raid.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-raid1.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-region-hash.c dm: Use kzalloc for all structs with embedded biosets/mempools 2020-04-07 09:27:22 +02:00
dm-round-robin.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-service-time.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-snap-persistent.c block: fix an integer overflow in logical block size 2020-04-07 13:37:29 +02:00
dm-snap-transient.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-snap.c dm: Use kzalloc for all structs with embedded biosets/mempools 2020-04-07 09:27:22 +02:00
dm-stats.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-stats.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-stripe.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-switch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-sysfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-table.c dm table: fix invalid memory accesses with too high sector number 2020-04-06 21:10:33 +02:00
dm-target.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-thin-metadata.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-thin-metadata.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-thin.c dm: Use kzalloc for all structs with embedded biosets/mempools 2020-04-07 09:27:22 +02:00
dm-uevent.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-uevent.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-verity-avb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-verity-debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-verity-debug.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-verity-fec.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-verity-fec.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-verity-target.c dm verity: use message limit for data block corruption message 2020-04-06 19:31:08 +02:00
dm-verity.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm-zero.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dm.c dm: use blk_set_queue_dying() in __dm_destroy() 2020-04-07 12:36:54 +02:00
dm.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
faulty.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
linear.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
linear.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
md-cluster.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
md-cluster.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
md.c md: don't set In_sync if array is frozen 2020-04-07 07:38:24 +02:00
md.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
multipath.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
multipath.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid1.c md: raid1: check rdev before reference in raid1_sync_request func 2020-04-07 13:24:22 +02:00
raid1.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid5-cache.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid5.c md/raid6: Set R5_ReadError when there is read failure on parity disk 2020-04-07 07:40:38 +02:00
raid5.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid10.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid10.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
raid0.c block: fix an integer overflow in logical block size 2020-04-07 13:37:29 +02:00
raid0.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30