android_kernel_samsung_a7y1.../include
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
..
acpi
asm-generic
clocksource
crypto
drm drm: mst: Fix query_payload ack reply struct 2020-04-07 13:20:02 +02:00
dt-bindings
keys
kvm
linux block: fix an integer overflow in logical block size 2020-04-07 13:37:29 +02:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2020-04-07 12:44:41 +02:00
media
memory
misc
net cfg80211/mac80211: make ieee80211_send_layer2_update a public function 2020-04-07 13:36:16 +02:00
pcmcia
ras
rdma
rxrpc
scsc
scsi scsi: target: iscsi: Wait for all commands to finish before freeing a session 2020-04-07 13:23:29 +02:00
sdp
soc
sound ASoC: Define a set of DAPM pre/post-up events 2020-04-07 08:07:42 +02:00
target
trace
uapi netfilter: uapi: Avoid undefined left-shift in xt_sctp.h 2020-04-07 13:28:41 +02:00
video fbdev: Remove unused SH-Mobile HDMI driver 2020-04-07 12:31:27 +02:00
xen
Kbuild