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: <ZItIZHfCji4EhfXk@smile.fi.intel.com>
Date:   Thu, 15 Jun 2023 20:20:36 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Rob Herring <robh@...nel.org>
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Frank Rowand <frowand.list@...il.com>
Subject: Re: [PATCH v1 1/1] of/platform: Propagate firmware node by calling
 device_set_node()

On Thu, Jun 15, 2023 at 08:13:52PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 15, 2023 at 10:44:52AM -0600, Rob Herring wrote:
> > On Thu, Jun 15, 2023 at 06:03:52PM +0300, Andy Shevchenko wrote:
> > > On Thu, Jun 15, 2023 at 06:01:17PM +0300, Andy Shevchenko wrote:
> > > > On Thu, Jun 15, 2023 at 05:59:52PM +0300, Andy Shevchenko wrote:
> > > > > On Thu, Jun 15, 2023 at 05:52:43PM +0300, Andy Shevchenko wrote:

...

> > > > > in the code which seems to me problematic in two ways:
> > > > > 1) (minor) the dev_set_name() may fail, no checks are there;
> > 
> > Is there anything besides a memory alloc failure? What will print a
> > message already. Wouldn't we fail a bit later on when adding the
> > device anyways?
> 
> I don't see how we fail. Any pointers?

Okay, code in question:

        /* subsystems can specify simple device enumeration */
        if (!dev_name(dev) && dev->bus && dev->bus->dev_name)
                dev_set_name(dev, "%s%u", dev->bus->dev_name, dev->id);

        if (!dev_name(dev)) {
                error = -EINVAL;
                goto name_error;
        }

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ