summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-20 10:42:04 +0200
committerClark Williams <williams@redhat.com>2012-03-01 09:28:28 -0600
commit12ab1a3dcf0d356dda5e7f8aba2ad38713172289 (patch)
tree20fe2ddedb9af55c88d5d061761f0a124dc8d638 /mm
parentbc60b5d57aa57a00ccba24fa7e72ecb6fb89e5a3 (diff)
mm-slab-move-debug-out.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab.c b/mm/slab.c
index b76905ef21d2..1fd998310cc1 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3851,10 +3851,10 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
{
unsigned long flags;
- local_irq_save(flags);
debug_check_no_locks_freed(objp, obj_size(cachep));
if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
debug_check_no_obj_freed(objp, obj_size(cachep));
+ local_irq_save(flags);
__cache_free(cachep, objp, __builtin_return_address(0));
local_irq_restore(flags);
@@ -3880,11 +3880,11 @@ void kfree(const void *objp)
if (unlikely(ZERO_OR_NULL_PTR(objp)))
return;
- local_irq_save(flags);
kfree_debugcheck(objp);
c = virt_to_cache(objp);
debug_check_no_locks_freed(objp, obj_size(c));
debug_check_no_obj_freed(objp, obj_size(c));
+ local_irq_save(flags);
__cache_free(c, (void *)objp, __builtin_return_address(0));
local_irq_restore(flags);
}