2
0
forked from Ivasoft/openwrt

kernel: Update kernel 4.19 to version 4.19.131

Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Run tested: ath79
Build tested: ath79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens
2020-07-04 01:34:26 +02:00
parent ce958dd88a
commit 6062d85892
54 changed files with 131 additions and 398 deletions

View File

@@ -1535,9 +1535,12 @@ static int ar934x_nfc_probe(struct platform_device *pdev)
goto err_free_buf;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 130)
nand->dummy_controller.ops = &ar934x_nfc_controller_ops;
ret = nand_scan(mtd, 1);
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
nand->dummy_controller.ops = &ar934x_nfc_controller_ops;
ret = nand_scan(nand, 1);
#else
nand->legacy.dummy_controller.ops = &ar934x_nfc_controller_ops;
ret = nand_scan(nand, 1);
@@ -1569,12 +1572,7 @@ static int ar934x_nfc_remove(struct platform_device *pdev)
nfc = platform_get_drvdata(pdev);
if (nfc) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
mtd = ar934x_nfc_to_mtd(nfc);
nand_release(mtd);
#else
nand_release(&nfc->nand_chip);
#endif
ar934x_nfc_free_buf(nfc);
}

View File

@@ -232,7 +232,11 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
nand->chip.dev_ready = rb4xx_nand_dev_ready;
nand->chip.chip_delay = 25;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,130)
ret = nand_scan(mtd, 1);
#else
ret = nand_scan(&nand->chip, 1);
#endif
#else
nand->chip.legacy.read_byte = rb4xx_nand_read_byte;
nand->chip.legacy.write_buf = rb4xx_nand_write_buf;
@@ -248,11 +252,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
nand_release(mtd);
#else
nand_release(&nand->chip);
#endif
return ret;
}
@@ -263,11 +263,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev)
{
struct rb4xx_nand *nand = platform_get_drvdata(pdev);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
nand_release(nand_to_mtd(&nand->chip));
#else
nand_release(&nand->chip);
#endif
return 0;
}