lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Jun 2023 09:53:53 +0100
From:   Jon Hunter <jonathanh@...dia.com>
To:     Prathamesh Shete <pshete@...dia.com>, linus.walleij@...aro.org,
        brgl@...ev.pl, thierry.reding@...il.com,
        linux-tegra@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     smangipudi@...dia.com, Manish Bhardwaj <mbhardwaj@...dia.com>
Subject: Re: [PATCH] gpio: tegra186: Check PMC driver status before any
 request


On 06/06/2023 08:17, Prathamesh Shete wrote:
> This patch fixes the issue where even if PMC driver status is
> disabled still we are trying to look up for the IRQ domain
> that PMC driver would've registered if it had been enabled.

It might be clearer to say ...

When the PMC device is disabled, probing of the Tegra186 GPIO driver 
fails because the IRQ domain that is registered by the PMC driver is not 
found. Fix this by checking to see if the PMC device is enabled before 
attempting to lookup the IRQ domain registered by the PMC.

Otherwise ...

Reviewed-by: Jon Hunter <jonathanh@...dia.com>

> Signed-off-by: Manish Bhardwaj <mbhardwaj@...dia.com>
> Signed-off-by: Prathamesh Shete <pshete@...dia.com>
> ---
>   drivers/gpio/gpio-tegra186.c | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
> index 464b0ea3b6f1..80d08ddde40e 100644
> --- a/drivers/gpio/gpio-tegra186.c
> +++ b/drivers/gpio/gpio-tegra186.c
> @@ -964,11 +964,15 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
>   
>   	np = of_find_matching_node(NULL, tegra186_pmc_of_match);
>   	if (np) {
> -		irq->parent_domain = irq_find_host(np);
> -		of_node_put(np);
> -
> -		if (!irq->parent_domain)
> -			return -EPROBE_DEFER;
> +		if (of_device_is_available(np)) {
> +			irq->parent_domain = irq_find_host(np);
> +			of_node_put(np);
> +
> +			if (!irq->parent_domain)
> +				return -EPROBE_DEFER;
> +		} else {
> +			of_node_put(np);
> +		}
>   	}
>   
>   	irq->map = devm_kcalloc(&pdev->dev, gpio->gpio.ngpio,

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ