Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'slab-for-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab

Pull slab fixes from Vlastimil Babka:

- Fixes for several corner cases in error paths and debugging options,
related to the new kmalloc_nolock() functionality (Kuniyuki Iwashima,
Ran Xiaokai)

* tag 'slab-for-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
slub: Don't call lockdep_unregister_key() for immature kmem_cache.
slab: Fix using this_cpu_ptr() in preemptible context
slab: Add allow_spin check to eliminate kmemleak warnings

+13 -4
+13 -4
mm/slub.c
··· 2152 2152 return 0; 2153 2153 } 2154 2154 2155 - kmemleak_not_leak(vec); 2155 + if (allow_spin) 2156 + kmemleak_not_leak(vec); 2156 2157 return 0; 2157 2158 } 2158 2159 ··· 6432 6431 6433 6432 static void defer_free(struct kmem_cache *s, void *head) 6434 6433 { 6435 - struct defer_free *df = this_cpu_ptr(&defer_free_objects); 6434 + struct defer_free *df; 6436 6435 6436 + guard(preempt)(); 6437 + 6438 + df = this_cpu_ptr(&defer_free_objects); 6437 6439 if (llist_add(head + s->offset, &df->objects)) 6438 6440 irq_work_queue(&df->work); 6439 6441 } 6440 6442 6441 6443 static void defer_deactivate_slab(struct slab *slab, void *flush_freelist) 6442 6444 { 6443 - struct defer_free *df = this_cpu_ptr(&defer_free_objects); 6445 + struct defer_free *df; 6444 6446 6445 6447 slab->flush_freelist = flush_freelist; 6448 + 6449 + guard(preempt)(); 6450 + 6451 + df = this_cpu_ptr(&defer_free_objects); 6446 6452 if (llist_add(&slab->llnode, &df->slabs)) 6447 6453 irq_work_queue(&df->work); 6448 6454 } ··· 7701 7693 pcs_destroy(s); 7702 7694 #ifndef CONFIG_SLUB_TINY 7703 7695 #ifdef CONFIG_PREEMPT_RT 7704 - lockdep_unregister_key(&s->lock_key); 7696 + if (s->cpu_slab) 7697 + lockdep_unregister_key(&s->lock_key); 7705 7698 #endif 7706 7699 free_percpu(s->cpu_slab); 7707 7700 #endif