[PATCH RT 1/6] Revert "slub: delay ctor until the object is requested"

From: Steven Rostedt
Date: Fri Aug 07 2015 - 14:08:29 EST


3.10.84-rt92-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

This approach is broken with SLAB_DESTROY_BY_RCU allocations.
Reported by Steven Rostedt and Koehrer Mathias.

Cc: stable-rt@xxxxxxxxxxxxxxx
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
mm/slub.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 8d8a3a641f0b..8ca44623dba7 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1347,10 +1347,8 @@ static void setup_object(struct kmem_cache *s, struct page *page,
void *object)
{
setup_object_debug(s, page, object);
-#ifndef CONFIG_PREEMPT_RT_FULL
if (unlikely(s->ctor))
s->ctor(object);
-#endif
}

static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
@@ -2446,10 +2444,6 @@ redo:

if (unlikely(gfpflags & __GFP_ZERO) && object)
memset(object, 0, s->object_size);
-#ifdef CONFIG_PREEMPT_RT_FULL
- if (unlikely(s->ctor) && object)
- s->ctor(object);
-#endif

slab_post_alloc_hook(s, gfpflags, object);

--
2.4.6


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/