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] [day] [month] [year] [list]
Message-ID: <20230408093330.GF11124@thinkpad>
Date:   Sat, 8 Apr 2023 15:03:30 +0530
From:   Manivannan Sadhasivam <mani@...nel.org>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc:     jdmason@...zu.us, dave.jiang@...el.com, allenbh@...il.com,
        lpieralisi@...nel.org, kw@...ux.com, kishon@...nel.org,
        bhelgaas@...gle.com, ntb@...ts.linux.dev,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: endpoint: pci-epf-vntb: Add missing check for
 alloc_workqueue

On Wed, Jan 04, 2023 at 05:08:08PM +0800, Jiasheng Jiang wrote:
> Add check for the return value of alloc_workqueue since it may return
> NULL pointer.
> 
> Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>

Reviewed-by: Manivannan Sadhasivam <mani@...nel.org>

- Mani

> ---
>  drivers/pci/endpoint/functions/pci-epf-vntb.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> index 04698e7995a5..05c99185ba65 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> @@ -1441,6 +1441,9 @@ static int __init epf_ntb_init(void)
>  
>  	kpcintb_workqueue = alloc_workqueue("kpcintb", WQ_MEM_RECLAIM |
>  					    WQ_HIGHPRI, 0);
> +	if (!kpcintb_workqueue)
> +		return -ENOMEM;
> +
>  	ret = pci_epf_register_driver(&epf_ntb_driver);
>  	if (ret) {
>  		destroy_workqueue(kpcintb_workqueue);
> -- 
> 2.25.1
> 

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ