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: <ZIsnvXztBQvtYw9b@smile.fi.intel.com>
Date:   Thu, 15 Jun 2023 18:01:17 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Rob Herring <robh+dt@...nel.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 05:59:52PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 15, 2023 at 05:52:43PM +0300, Andy Shevchenko wrote:
> > Insulate of_device_alloc() and of_amba_device_create() from possible
> > changes to fwnode_handle implementation by using device_set_node()
> > instead of open-coding dev->dev.fwnode assignments.
> 
> Side note. When I preparing this change I have noticed a lot of
> 
> 	dev_set_name(... dev_name())

Plus

	dev_set_name(dev, ...)
	...
	dev_set_name(dev, ...)

on the same device will also give a memory leak.

> in the code which seems to me problematic in two ways:
> 1) (minor) the dev_set_name() may fail, no checks are there;
> 2) (major?) the above construction leaks memory.
> 
> Is it on purpose (esp. second point)? If no, can it be fixed?
> Note, I'm not familiar with OF platform code, so I would help
> reviewing the change, but that's it.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ