linux-stable/drivers/mtd
huijin.park 87b4ed6c62 mtd: spi-nor: cast to u64 to avoid uint overflows
commit 84a1c2109d upstream.

The "params->size" is defined as "u64".
And "info->sector_size" and "info->n_sectors" are defined as
unsigned int and u16.
Thus, u64 data might have strange data(loss data) if the result
overflows an unsigned int.
This patch casts "info->sector_size" to an u64.

Signed-off-by: huijin.park <huijin.park@samsung.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-05 15:38:22 +01:00
..
chips mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() 2019-10-05 12:47:33 +02:00
devices mtd: docg3: don't set conflicting BCH_CONST_PARAMS option 2018-11-21 09:24:09 +01:00
lpddr
maps mtd: physmap_of: Release resources on error 2019-11-24 08:23:08 +01:00
nand mtd: rawnand: atmel: fix possible object reference leak 2019-12-05 15:38:21 +01:00
onenand
parsers
spi-nor mtd: spi-nor: cast to u64 to avoid uint overflows 2019-12-05 15:38:22 +01:00
tests mtd: mtd_oobtest: Handle bitflips during reads 2018-04-12 12:32:20 +02:00
ubi ubi: Do not drop UBI device reference before using 2019-12-05 15:37:19 +01:00
afs.c
ar7part.c
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c mtdchar: fix overflows in adjustment of count 2018-09-26 08:38:09 +02:00
mtdconcat.c
mtdcore.c
mtdcore.h mtd: Check add_mtd_device() ret code 2019-12-05 15:37:54 +01:00
mtdoops.c
mtdpart.c mtd: Remove a debug trace in mtdpart.c 2019-12-05 15:38:04 +01:00
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c