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: <20241121160330.GA3239115@rocinante>
Date: Fri, 22 Nov 2024 01:03:30 +0900
From: Krzysztof WilczyƄski <kw@...ux.com>
To: Klara Modin <klarasmodin@...il.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	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

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.

Thank you for testing!  Much appreciated.

We've also received other signal about this, too, per:

  - https://lore.kernel.org/r/673f39b0.050a0220.363a1b.0126.GAE@google.com
  - https://lore.kernel.org/r/CA+G9fYurbY3B6ahZ+k+Syp5bZ3a+YQdeX8DRb6Twi4BDEFbUsw@mail.gmail.com

> > > > 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!

I added the NULL check back.

	Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ