aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-07-04 01:34:26 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-07-04 21:12:42 +0200
commit6062d858929df927e244280ec4864b35a217d6d1 (patch)
tree6ff4342b85f5b4953b16f9561176d2ea0f1b4fa2 /target/linux/ath79
parentce958dd88a7e74cd7aa7c345c97c79556bc2d926 (diff)
downloadupstream-6062d858929df927e244280ec4864b35a217d6d1.tar.gz
upstream-6062d858929df927e244280ec4864b35a217d6d1.tar.bz2
upstream-6062d858929df927e244280ec4864b35a217d6d1.zip
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>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r--target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c10
-rw-r--r--target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c12
-rw-r--r--target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch2
-rw-r--r--target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch4
4 files changed, 11 insertions, 17 deletions
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
index 63abc4a8d8..b35343c8d9 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
@@ -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);
}
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
index 922d7095cb..382af09978 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
@@ -232,8 +232,12 @@ 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;
nand->chip.legacy.read_buf = rb4xx_nand_read_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;
}
diff --git a/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch
index 52d77c805c..82e563b29c 100644
--- a/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch
+++ b/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
-@@ -161,6 +161,11 @@ static int ehci_platform_probe(struct pl
+@@ -271,6 +271,11 @@ static int ehci_platform_probe(struct pl
ehci = hcd_to_ehci(hcd);
if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
diff --git a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch
index 0efb33676a..61695ae55f 100644
--- a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch
@@ -267,7 +267,7 @@
case IPV6_2292HOPOPTS:
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
-@@ -452,7 +452,7 @@ static void ip6gre_err(struct sk_buff *s
+@@ -455,7 +455,7 @@ static void ip6gre_err(struct sk_buff *s
return;
ipv6h = (const struct ipv6hdr *)skb->data;
greh = (const struct gre_base_hdr *)(skb->data + offset);
@@ -728,7 +728,7 @@
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
-@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3906,14 +3906,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);