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: <BN8PR11MB3668709A318C10F19261FB6CE9409@BN8PR11MB3668.namprd11.prod.outlook.com>
Date:   Thu, 8 Sep 2022 05:56:58 +0000
From:   <Kumaravel.Thiagarajan@...rochip.com>
To:     <weiyongjun@...weicloud.com>, <arnd@...db.de>,
        <gregkh@...uxfoundation.org>
CC:     <weiyongjun1@...wei.com>, <linux-gpio@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH -next v2 1/5] misc: microchip: pci1xxxx: fix error
 handling in gp_aux_bus_probe()

> -----Original Message-----
> From: Wei Yongjun <weiyongjun@...weicloud.com>
> Sent: Wednesday, September 7, 2022 8:28 PM
> To: Kumaravel Thiagarajan - I21417
> <Kumaravel.Thiagarajan@...rochip.com>; Arnd Bergmann
> <arnd@...db.de>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Wei Yongjun <weiyongjun1@...wei.com>; linux-gpio@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Subject: [PATCH -next v2 1/5] misc: microchip: pci1xxxx: fix error handling in
> gp_aux_bus_probe()
> 
> 
> From: Wei Yongjun <weiyongjun1@...wei.com>
> 
> In some error handling path, resoures alloced may not released.
> This patch fix them.
Greg, I have identified some more improvements necessary for the gp_aux_bus_probe function.
I am working on it.
But this patch can still be applied.

> 
> Fixes: 393fc2f5948f ("misc: microchip: pci1xxxx: load auxiliary bus driver for the PIO function in the multi-function endpoint of pci1xxxx device.")

Reviewed-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@...rochip.com>

> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
> v1 - > v2: add fixes tag, fix pci_alloc_irq_vectors handing
> ---
>  drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
> b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
> index bfc03028b34d..11f79f239006 100644
> --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
> +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
> @@ -87,12 +87,13 @@ static int gp_aux_bus_probe(struct pci_dev *pdev,
> const struct pci_device_id *id
>         retval = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
> 
>         if (retval < 0)
> -               return retval;
> +               goto err_aux_dev_init_1;
> 
> -       pdev->irq = pci_irq_vector(pdev, 0);
> -       if (pdev->irq < 0)
> -               return retval;
> +       retval = pci_irq_vector(pdev, 0);
> +       if (retval < 0)
> +               goto err_aux_dev_init_1;
> 
> +       pdev->irq = retval;
>         aux_bus->aux_device_wrapper[1]->gp_aux_data.irq_num = pdev->irq;
> 
>         retval = auxiliary_device_init(&aux_bus->aux_device_wrapper[1]-
> >aux_dev);
> --
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ