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, 25 May 2011 09:25:12 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	James Morris <jmorris@...ei.org>,
	Pekka Enberg <penberg@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: SLUB regression in current Linus

On Tue, 24 May 2011, Linus Torvalds wrote:

> Look at __slab_alloc: we have:
>
>
>         page = c->page;
>         if (!page)
>                 goto new_slab;
>
>         slab_lock(page);
>         if (unlikely(!node_match(c, node)))
>                 goto another_slab;
>
> and let's assume we have two users racing on that "c->page". The
> "slab_lock()" is going to work for one of them, right?

There cannot be two users racing through this code segment since we have
interrupts disabled and c is pointing to a per cpu structure. c->page
points to a page that can only be allocated from from the current
processor (from the freelist in c->freelist) but it can be freed to from
multiple cpus (via the page->freelist). The code that you are discussing
is copying the freed objects from the page->freelist to the per cpu
freelist and it needs to lock out the slab_free path to do that.


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