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:	Wed, 16 Oct 2013 15:27:54 +0000
From:	Christoph Lameter <cl@...ux.com>
To:	Joonsoo Kim <iamjoonsoo.kim@....com>
cc:	Pekka Enberg <penberg@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Joonsoo Kim <js1304@...il.com>,
	David Rientjes <rientjes@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Wanpeng Li <liwanp@...ux.vnet.ibm.com>,
	Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH v2 01/15] slab: correct pfmemalloc check

On Wed, 16 Oct 2013, Joonsoo Kim wrote:

> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -930,7 +930,8 @@ static void *__ac_put_obj(struct kmem_cache *cachep, struct array_cache *ac,
>  {
>  	if (unlikely(pfmemalloc_active)) {
>  		/* Some pfmemalloc slabs exist, check if this is one */
> -		struct page *page = virt_to_head_page(objp);
> +		struct slab *slabp = virt_to_slab(objp);
> +		struct page *page = virt_to_head_page(slabp->s_mem);
>  		if (PageSlabPfmemalloc(page))

I hope the compiler optimizes this code correctly because virt_to_slab
already does one virt_to_head_page()?

Otherwise this looks fine.
--
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