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: <BYAPR07MB538123BB52A4F6323B9A5633DD0D9@BYAPR07MB5381.namprd07.prod.outlook.com>
Date:   Fri, 18 Jun 2021 04:14:34 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Yang Yingliang <yangyingliang@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: RE: [PATCH -next] usb: cdnsp: fix error return code in
 cdnsp_alloc_priv_device()


>
>If cdnsp_ring_alloc() fails, cdnsp_alloc_priv_device() need return
>error code.
>
>Reported-by: Hulk Robot <hulkci@...wei.com>
>Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>

Acked-by: Pawel Laszczak <pawell@...ence.com>

Thanks.

>---
> drivers/usb/cdns3/cdnsp-mem.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
>index a47948a1623f..c87bf3513844 100644
>--- a/drivers/usb/cdns3/cdnsp-mem.c
>+++ b/drivers/usb/cdns3/cdnsp-mem.c
>@@ -694,8 +694,10 @@ static int cdnsp_alloc_priv_device(struct cdnsp_device *pdev)
>
> 	/* Allocate endpoint 0 ring. */
> 	pdev->eps[0].ring = cdnsp_ring_alloc(pdev, 2, TYPE_CTRL, 0, GFP_ATOMIC);
>-	if (!pdev->eps[0].ring)
>+	if (!pdev->eps[0].ring) {
>+		ret = -ENOMEM;
> 		goto fail;
>+	}
>
> 	/* Point to output device context in dcbaa. */
> 	pdev->dcbaa->dev_context_ptrs[1] = cpu_to_le64(pdev->out_ctx.dma);
>--
>2.25.1

--

Regards,
Pawel Laszczak

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ