From: Christoph Lameter Date: Tue, 9 Aug 2011 18:01:32 +0000 (-0500) Subject: slub: Fix partial count comparison confusion X-Git-Tag: MMI-PSA29.97-13-9~18369^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81107188f123e3c2217ac2f2feb2a1147904c62f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git slub: Fix partial count comparison confusion deactivate_slab() has the comparison if more than the minimum number of partial pages are in the partial list wrong. An effect of this may be that empty pages are not freed from deactivate_slab(). The result could be an OOM due to growth of the partial slabs per node. Frees mostly occur from __slab_free which is okay so this would only affect use cases where a lot of switching around of per cpu slabs occur. Switching per cpu slabs occurs with high frequency if debugging options are enabled. Reported-and-tested-by: Xiaotian Feng Signed-off-by: Christoph Lameter Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index 6da68597bde8..9f662d70eb47 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1854,7 +1854,7 @@ redo: new.frozen = 0; - if (!new.inuse && n->nr_partial < s->min_partial) + if (!new.inuse && n->nr_partial > s->min_partial) m = M_FREE; else if (new.freelist) { m = M_PARTIAL;