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: <86039c78-d05f-4bae-b2cb-55bbfca8f798@nvidia.com>
Date: Mon, 15 Apr 2024 16:52:08 +0530
From: Vidya Sagar <vidyas@...dia.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: lpieralisi@...nel.org, kw@...ux.com, robh@...nel.org,
 bhelgaas@...gle.com, thierry.reding@...il.com, jonathanh@...dia.com,
 linux-pci@...r.kernel.org, linux-tegra@...r.kernel.org,
 linux-kernel@...r.kernel.org, kthota@...dia.com, mmaddireddy@...dia.com,
 sagar.tv@...il.com
Subject: Re: [PATCH V2] PCI: tegra194: Fix probe path for Endpoint mode

It was Jon Hunter (jonathanh@...dia.com), who identified the issue.
Credits to him.
I'm merely upstreaming the fix.

Thanks,
Vidya Sagar

On 13-04-2024 00:44, Bjorn Helgaas wrote:
> External email: Use caution opening links or attachments
>
>
> On Mon, Apr 08, 2024 at 03:00:53PM +0530, Vidya Sagar wrote:
>> Tegra194 PCIe probe path is taking failure path in success case for
>> Endpoint mode. Return success from the switch case instead of going
>> into the failure path.
>>
>> Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
>> Signed-off-by: Vidya Sagar <vidyas@...dia.com>
>> Reviewed-by: Jon Hunter <jonathanh@...dia.com>
>> ---
>> v2:
>> * Added 'Fixes' and 'Reviewed-by' from Jon Hunter
>>
>>   drivers/pci/controller/dwc/pcie-tegra194.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
>> index 4bba31502ce1..1a8178dc899a 100644
>> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
>> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
>> @@ -2273,11 +2273,14 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
>>                ret = tegra_pcie_config_ep(pcie, pdev);
>>                if (ret < 0)
>>                        goto fail;
>> +             else
>> +                     return 0;
> Wow, how did you ever notice this?  It looks like this path would
> previously have returned "ret" (which was most likely 0 for success)
> but with an extra tegra_bpmp_put() that we shouldn't have done.
>
> Eagle eyes!
>
>>                break;
>>
>>        default:
>>                dev_err(dev, "Invalid PCIe device type %d\n",
>>                        pcie->of_data->mode);
>> +             ret = -EINVAL;
>>        }
>>
>>   fail:
>> --
>> 2.25.1
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ