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]
Date:	Thu, 3 Mar 2011 14:00:16 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Cyrill Gorcunov <gorcunov@...il.com>
cc:	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, tglx@...utronix.de,
	yinghai@...nel.org, brgerst@...il.com, shaohui.zheng@...el.com,
	linux-kernel@...r.kernel.org
Subject: Re: [patch] x86, mm: Clean up initmem_init

On Fri, 4 Mar 2011, Cyrill Gorcunov wrote:

> > This patch cleans initmem_init() so that it is more readable and doesn't
> > use an unnecessary array of function pointers to convolute the flow of
> > the code.  It also makes it obvious that dummy_numa_init() will always
> > succeed (and documents that requirement) so that the existing BUG() is
> > never actually reached.
> > 
> > No functional change.
> > 
> > Signed-off-by: David Rientjes <rientjes@...gle.com>
> > ---
> >  arch/x86/mm/numa_64.c |   92 ++++++++++++++++++++++++++++---------------------
> >  1 files changed, 53 insertions(+), 39 deletions(-)
> > 
> ...
> > +void __init initmem_init(void)
> > +{
> > +	int ret;
> >  
> > -			if (nid == NUMA_NO_NODE)
> > -				continue;
> > -			if (!node_online(nid))
> > -				numa_clear_node(j);
> > -		}
> > -		numa_init_array();
> > -		return;
> > +	if (!numa_off) {
> > +#ifdef CONFIG_ACPI_NUMA
> > +		ret = numa_init(x86_acpi_numa_init);
> > +		if (!ret)
> > +			return;
> > +#endif
> > +#ifdef CONFIG_AMD_NUMA
> > +		ret = numa_init(amd_numa_init);
> > +		if (!ret)
> > +			return;
> > +#endif
> >  	}
> > -	BUG();
> > +
> > +	numa_init(dummy_numa_init);
> >  }
> >  
> >  unsigned long __init numa_free_all_bootmem(void)
> 
> Divid, I suspect it's due to diff format and we still need "ret" here, right?
> 

Not sure what you mean.  "ret" is a temporary variable to test the return 
values of numa_init() and return from initmem_init() on success.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ