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: <20190830124657.GE2680@smile.fi.intel.com>
Date:   Fri, 30 Aug 2019 15:46:57 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc:     Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
        rafael@...nel.org, linux-acpi@...r.kernel.org,
        devicetree@...r.kernel.org, Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v3 05/10] device property: Add a function to obtain a
 node's prefix

On Thu, Aug 29, 2019 at 01:10:38PM +0300, Sakari Ailus wrote:
> The prefix is used for printing purpose before a node, and it also works
> as a separator between two nodes.

> +	/* Is this the root node? */
> +	parent = fwnode_get_parent(fwnode);
> +	if (!parent)
> +		return "";
> +
> +	/* Is this 2nd node from the root? */
> +	parent = fwnode_get_next_parent(parent);
> +	if (!parent)

Can we theoretically have a case when we got parent != NULL and thus taken
reference, while the 2nd one is NULL and we leak reference here (and in all
similar places)?

> +		return "";
> +
> +	fwnode_handle_put(parent);

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ