summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-bulk.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2017-09-12 15:10:35 +0200
committerBoris Brezillon <boris.brezillon@free-electrons.com>2017-09-18 09:53:27 +0200
commitb8f3911610529ba531b99d1e109c7a40fb071f0a (patch)
treec39be062e14d0b719e9ed49d29fcc265c4e909b0 /drivers/clk/clk-bulk.c
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
downloadlinux-b8f3911610529ba531b99d1e109c7a40fb071f0a.tar.bz2
mtd: spi-nor: Check consistency of the memory size extracted from the SFDP
One field of the flash parameter table contains information about the flash device size. Most of the time the data extracted from this field is valid, but sometimes the BFPT section of the SFDP table is corrupted or invalid and this field is set to 0xffffffff, thus resulting in an integer overflow when setting params->size. Since NOR devices are anayway always smaller than 2^64 bytes, we can easily stop the BFPT parsing if the size reported in this table is invalid. Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.com>
Diffstat (limited to 'drivers/clk/clk-bulk.c')
0 files changed, 0 insertions, 0 deletions