openwrtv3/target/linux/ar71xx
Gabor Juhos 2ecc413107 ar71xx: fix invalid pointer dereference in c60_nand_scan_fixup()
Since Linux 4.6, mtd->priv no longer points to the NAND specific
structure. Under 4.9 it contains NULL, thus using it to access
the fields of the nand_chip structure causes an invalid pointer
dereference.

Update the code to use the mtd_to_nand() helper under 4.9 to obtain
the address of the chip specific data.

Compile tested only.

Fixes: 7bbf4117c6 ("ar71xx: Add kernel 4.9 support")
Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
2017-12-15 23:57:41 +01:00
..
base-files ar71xx: Fix switch port numbering on MIkrotik RB951Ui-2nD and RB493G 2017-12-14 09:29:30 +01:00
files ar71xx: fix invalid pointer dereference in c60_nand_scan_fixup() 2017-12-15 23:57:41 +01:00
generic ar71xx: unify CONFIG_CMDLINE 2017-09-28 22:45:39 +02:00
image ar71xx: generate BR region-code factory image for TP-Link TL-WR940N 2017-12-14 09:29:30 +01:00
mikrotik ar71xx: add support for TP-Link TL-WR1043N v5 2017-11-14 22:36:46 +01:00
nand ar71xx: add support for TP-Link TL-WR1043N v5 2017-11-14 22:36:46 +01:00
patches-4.4 ar71xx: fix board detection with newer RouterBOOT versions 2017-12-12 17:05:25 +08:00
patches-4.9 ar71xx: fix board detection with newer RouterBOOT versions 2017-12-12 17:05:25 +08:00
config-4.4 ar71xx: add support for TP-Link TL-WR1043N v5 2017-11-14 22:36:46 +01:00
config-4.9 ar71xx: add support for TP-Link TL-WR1043N v5 2017-11-14 22:36:46 +01:00
Makefile ar71xx: use kernel 4.9 by default 2017-10-22 15:22:51 +02:00
modules.mk ar71xx: add LED driver NU801 2015-12-11 15:04:57 +00:00