mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
e5aa498acb
Fixes CVE-2020-10757 via upstream commit df4988aa1c96 ("mm: Fix mremap not considering huge pmd devmap"). Resolved merge conflict in the following patches: bcm27xx: 950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch Refreshed patches, removed upstreamed patch: generic: 751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch generic: 754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch Run tested: qemu-x86-64 Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From e8287ec10f21877eb0ac4c1fb4e89e42d8bc10da Mon Sep 17 00:00:00 2001
|
|
From: Tim Harvey <tharvey@gateworks.com>
|
|
Date: Wed, 11 Mar 2020 08:19:45 -0700
|
|
Subject: [PATCH 2/7] gpio: thunderx: fix irq_request_resources
|
|
|
|
If there are no parent resources do not call irq_chip_request_resources_parent
|
|
at all as this will return an error.
|
|
|
|
This resolves a regression where devices using a thunderx gpio as an interrupt
|
|
would fail probing.
|
|
|
|
Fixes: 0d04d0c ("gpio: thunderx: Use the default parent apis for {request,release}_resources")
|
|
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
|
---
|
|
drivers/gpio/gpio-thunderx.c | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/gpio/gpio-thunderx.c
|
|
+++ b/drivers/gpio/gpio-thunderx.c
|
|
@@ -363,15 +363,18 @@ static int thunderx_gpio_irq_request_res
|
|
{
|
|
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
|
struct thunderx_gpio *txgpio = txline->txgpio;
|
|
+ struct irq_data *parent_data = data->parent_data;
|
|
int r;
|
|
|
|
r = gpiochip_lock_as_irq(&txgpio->chip, txline->line);
|
|
if (r)
|
|
return r;
|
|
|
|
- r = irq_chip_request_resources_parent(data);
|
|
- if (r)
|
|
- gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
|
|
+ if (parent_data && parent_data->chip->irq_request_resources) {
|
|
+ r = irq_chip_request_resources_parent(data);
|
|
+ if (r)
|
|
+ gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
|
|
+ }
|
|
|
|
return r;
|
|
}
|