diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-30 15:39:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-30 15:39:15 -0400 |
commit | 970e2dfa672b5b26967b0983e24b8d92f972c907 (patch) | |
tree | 48ca21427d8c9c87a574ccd8dd7350a00419fa93 | |
parent | 3a3485be68c3b44dd7e3790472976fdc2467bb40 (diff) | |
parent | 2208b764c14d0f1ad63da64b1a42db6077b6fe42 (diff) |
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
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1131,6 +1131,7 @@ static void __free_slab(struct kmem_cache *s, struct page *page) | |||
1131 | slab_pad_check(s, page); | 1131 | slab_pad_check(s, page); |
1132 | for_each_object(p, s, page_address(page)) | 1132 | for_each_object(p, s, page_address(page)) |
1133 | check_object(s, page, p, 0); | 1133 | check_object(s, page, p, 0); |
1134 | ClearSlabDebug(page); | ||
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | mod_zone_page_state(page_zone(page), | 1137 | mod_zone_page_state(page_zone(page), |
@@ -1169,7 +1170,6 @@ static void discard_slab(struct kmem_cache *s, struct page *page) | |||
1169 | 1170 | ||
1170 | atomic_long_dec(&n->nr_slabs); | 1171 | atomic_long_dec(&n->nr_slabs); |
1171 | reset_page_mapcount(page); | 1172 | reset_page_mapcount(page); |
1172 | ClearSlabDebug(page); | ||
1173 | __ClearPageSlab(page); | 1173 | __ClearPageSlab(page); |
1174 | free_slab(s, page); | 1174 | free_slab(s, page); |
1175 | } | 1175 | } |
@@ -1656,6 +1656,7 @@ static void __always_inline slab_free(struct kmem_cache *s, | |||
1656 | unsigned long flags; | 1656 | unsigned long flags; |
1657 | 1657 | ||
1658 | local_irq_save(flags); | 1658 | local_irq_save(flags); |
1659 | debug_check_no_locks_freed(object, s->objsize); | ||
1659 | if (likely(page == s->cpu_slab[smp_processor_id()] && | 1660 | if (likely(page == s->cpu_slab[smp_processor_id()] && |
1660 | !SlabDebug(page))) { | 1661 | !SlabDebug(page))) { |
1661 | object[page->offset] = page->lockless_freelist; | 1662 | object[page->offset] = page->lockless_freelist; |