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: <20080307084047.GE12150@elte.hu>
Date:	Fri, 7 Mar 2008 09:40:48 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Yinghai Lu <yhlu.kernel@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86_64: tight online check in setup_per_cpu_areas


* Yinghai Lu <yhlu.kernel@...il.com> wrote:

> [PATCH] x86_64: tight online check in setup_per_cpu_areas
> 
> when numa disabled got compile warning:
> arch/x86/kernel/setup64.c: In function ???setup_per_cpu_areas???:
> arch/x86/kernel/setup64.c:147: warning: the address of ???contig_page_data??? will always evaluate as ???true???
> 
> it seems we missed checking if the node is online before we try to 
> refer NODE_DATA. so fix it

thanks, applied.

> +#ifndef CONFIG_NEED_MULTIPLE_NODES
> +		ptr = alloc_bootmem_pages(size);
> +#else
> +		int node = early_cpu_to_node(i);
>  
> +		if (!node_online(node) || !NODE_DATA(node))
>  			ptr = alloc_bootmem_pages(size);
> +		else
> +			ptr = alloc_bootmem_pages_node(NODE_DATA(node), size);
> +#endif

i'm wondering, shouldnt there just be a single facility for this mode of 
allocation, instead of this #ifdef and branch maze?

	Ingo
--
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