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: <a7b8f84d-efa6-490c-8594-84c1de9a7031@gmail.com>
Date: Thu, 21 Nov 2024 09:54:13 +0100
From: Klara Modin <klarasmodin@...il.com>
To: Krzysztof Wilczyński <kw@...ux.com>,
 Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Bjorn Helgaas <helgaas@...nel.org>,
 Bjorn Helgaas <bhelgaas@...gle.com>,
 Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
 linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
 Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
 Johan Hovold <johan+linaro@...nel.org>, Abel Vesa <abel.vesa@...aro.org>,
 Stephan Gerhold <stephan.gerhold@...aro.org>,
 Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
 Bjorn Andersson <bjorn.andersson@....qualcomm.com>,
 stable+noautosel@...nel.org,
 Krishna chaitanya chundru <quic_krichai@...cinc.com>
Subject: Re: [PATCH v2 2/5] PCI/pwrctl: Create pwrctl devices only if at least
 one power supply is present

Hi,

On 2024-11-16 19:41, Krzysztof Wilczyński wrote:
> Hello,
> 
> [...]
>>>>> +bool of_pci_is_supply_present(struct device_node *np)
>>>>> +{
>>>>> +     struct property *prop;
>>>>> +     char *supply;
>>>>> +
>>>>> +     if (!np)
>>>>> +             return false;
>>>>
>>>> Why do we need to test !np here?  It should always be non-NULL.
>>>>

This doesn't appear to be the case, at least on my x86 machine and on 
x86 QEMU with CONFIG_OF enabled.

>>>
>>> Right, I think this can be dropped. We check for the OF node in the
>>> function above.
>>>
>>
>> I think it was a leftover that I didn't cleanup. But I do plan to move this API
>> to drivers/of once 6.13-rc1 is out. So even if it didn't get dropped now, I will
>> do it later.
> 
> I removed the NULL check directly on the branch.  Thank you!
> 
> 	Krzysztof
> 

I get a NULL pointer exception at boot which disappears if I readd the 
check.

Regards,
Klara Modin
View attachment "of_pci_null_ptr_decoded" of type "text/plain" (30776 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ