diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c index 9c3937c5ce38..764a1023ed87 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3104,6 +3104,15 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, if (unlikely(!object)) { /* + * We may have removed an object from c->freelist using + * the fastpath in the previous iteration; in that case, + * c->tid has not been bumped yet. + * Since ___slab_alloc() may reenable interrupts while + * allocating memory, we should bump c->tid now. + */ + c->tid = next_tid(c->tid); + + /* * Invoking slow path likely have side-effect * of re-populating per CPU c->freelist */ |