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]
Date:	Tue, 1 Mar 2016 13:21:12 +0100
From:	Robert Richter <robert.richter@...iumnetworks.com>
To:	David Daney <ddaney.cavm@...il.com>
CC:	Robert Richter <rric@...nel.org>,
	Will Deacon <will.deacon@....com>,
	<linux-arm-kernel@...ts.infradead.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	<devicetree@...r.kernel.org>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Frank Rowand <frowand.list@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Matt Fleming <matt@...eblueprint.co.uk>,
	<linux-efi@...r.kernel.org>,
	Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>,
	<linux-kernel@...r.kernel.org>,
	David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v12 4/5] arm64, numa: Add NUMA support for arm64
 platforms.

On 29.02.16 15:42:58, David Daney wrote:
> On 02/29/2016 09:34 AM, Robert Richter wrote:
> >On 22.02.16 17:58:22, David Daney wrote:
> >>From: Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>

> >>+static int __init numa_init(int (*init_func)(void))
> >>+{
> >>+	int ret;
> >>+
> >>+	nodes_clear(numa_nodes_parsed);
> >>+	nodes_clear(node_possible_map);
> >>+	nodes_clear(node_online_map);
> >>+	numa_free_distance();
> 
>         ^^^^^^^^^^^^^
>      Cleanup for any previous numa_alloc_distance()
> 
> >>+
> >>+	ret = numa_alloc_distance();
> >>+	if (ret < 0)
> >>+		return ret;
> >
> >If you move this before the remaining initializers, you will need to
> >clean this up on error.
> 
> Yes, we do this.  See above.
> 
> >So better move it back after
> >numa_register_nodes() as it was in v10. This should work since
> >distances are used not earlier than numa is enabled.
> 
> I moved it here for a reason.
> 
> The init_func (of_numa_init() in this case) makes callbacks that use the
> numa_distance object.  We need to allocate it before using it. Allocating it
> after calling the init_func() is too late.

Sounds reasonable and looks sane now.

Thanks,

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ