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:	Sat, 9 Jun 2012 19:19:13 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	David Mackey <tdmackey@...tter.com>
cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Andi Kleen <ak@...ux.intel.com>, penberg@...nel.org,
	cl@...ux.com
Subject: Re: [PATCH v5] slab/mempolicy: always use local policy from interrupt
 context

On Sat, 9 Jun 2012, David Mackey wrote:

> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index f15c1b2..cb0b230 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -1602,8 +1602,14 @@ static unsigned interleave_nodes(struct mempolicy *policy)
>   * task can change it's policy.  The system default policy requires no
>   * such protection.
>   */
> -unsigned slab_node(struct mempolicy *policy)
> +unsigned slab_node(void)
>  {
> +	struct mempolicy *policy;
> +
> +	if (in_interrupt())
> +		return numa_node_id();
> +
> +	policy = current->mempolicy;
>  	if (!policy || policy->flags & MPOL_F_LOCAL)
>  		return numa_node_id();
>  

Should probably be numa_mem_id() in both these cases for 
CONFIG_HAVE_MEMORYLESS_NODES, but it won't cause a problem in this form 
either.

Acked-by: David Rientjes <rientjes@...gle.com>
--
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