Merge branch 'to-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/slab
* 'to-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/slab: slub: fix bug in slub debug support slub: add lock debugging check
This commit is contained in:
@ -1131,6 +1131,7 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
|
|||||||
slab_pad_check(s, page);
|
slab_pad_check(s, page);
|
||||||
for_each_object(p, s, page_address(page))
|
for_each_object(p, s, page_address(page))
|
||||||
check_object(s, page, p, 0);
|
check_object(s, page, p, 0);
|
||||||
|
ClearSlabDebug(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
mod_zone_page_state(page_zone(page),
|
mod_zone_page_state(page_zone(page),
|
||||||
@ -1169,7 +1170,6 @@ static void discard_slab(struct kmem_cache *s, struct page *page)
|
|||||||
|
|
||||||
atomic_long_dec(&n->nr_slabs);
|
atomic_long_dec(&n->nr_slabs);
|
||||||
reset_page_mapcount(page);
|
reset_page_mapcount(page);
|
||||||
ClearSlabDebug(page);
|
|
||||||
__ClearPageSlab(page);
|
__ClearPageSlab(page);
|
||||||
free_slab(s, page);
|
free_slab(s, page);
|
||||||
}
|
}
|
||||||
@ -1656,6 +1656,7 @@ static void __always_inline slab_free(struct kmem_cache *s,
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
|
debug_check_no_locks_freed(object, s->objsize);
|
||||||
if (likely(page == s->cpu_slab[smp_processor_id()] &&
|
if (likely(page == s->cpu_slab[smp_processor_id()] &&
|
||||||
!SlabDebug(page))) {
|
!SlabDebug(page))) {
|
||||||
object[page->offset] = page->lockless_freelist;
|
object[page->offset] = page->lockless_freelist;
|
||||||
|
Reference in New Issue
Block a user