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]
Message-ID: <8a0bda6b-6879-e4ac-cfe6-171abbd72abd@synopsys.com>
Date:   Wed, 13 Mar 2019 10:05:24 +0000
From:   Gustavo Pimentel <gustavo.pimentel@...opsys.com>
To:     Jisheng Zhang <Jisheng.Zhang@...aptics.com>,
        Jingoo Han <jingoohan1@...il.com>,
        Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Bjorn Helgaas <bhelgaas@...gle.com>
CC:     "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 1/5] PCI: dwc: Fix dw_pcie_free_msi() if msi_irq is
 invalid

On 01/03/2019 05:03, Jisheng Zhang wrote:
> We should check msi_irq before calling irq_set_chained_handler() and
> irq_set_handler_data().
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@...aptics.com>
> ---
>  drivers/pci/controller/dwc/pcie-designware-host.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 0c18ab63811f..a94d3530b694 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -298,8 +298,10 @@ int dw_pcie_allocate_domains(struct pcie_port *pp)
>  
>  void dw_pcie_free_msi(struct pcie_port *pp)
>  {
> -	irq_set_chained_handler(pp->msi_irq, NULL);
> -	irq_set_handler_data(pp->msi_irq, NULL);
> +	if (pp->msi_irq) {
> +		irq_set_chained_handler(pp->msi_irq, NULL);
> +		irq_set_handler_data(pp->msi_irq, NULL);
> +	}
>  
>  	irq_domain_remove(pp->msi_domain);
>  	irq_domain_remove(pp->irq_domain);
> 

Sounds good.

Acked-by: Gustavo Pimentel <gustavo.pimentel@...opsys.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ