aboutsummaryrefslogtreecommitdiffstats
path: root/mm/kmemleak.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r--mm/kmemleak.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index b18d9ca578b9..ffd162abbe5e 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -555,6 +555,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
555 object->tree_node.last = ptr + size - 1; 555 object->tree_node.last = ptr + size - 1;
556 556
557 write_lock_irqsave(&kmemleak_lock, flags); 557 write_lock_irqsave(&kmemleak_lock, flags);
558
558 min_addr = min(min_addr, ptr); 559 min_addr = min(min_addr, ptr);
559 max_addr = max(max_addr, ptr + size); 560 max_addr = max(max_addr, ptr + size);
560 node = prio_tree_insert(&object_tree_root, &object->tree_node); 561 node = prio_tree_insert(&object_tree_root, &object->tree_node);
@@ -565,14 +566,12 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
565 * random memory blocks. 566 * random memory blocks.
566 */ 567 */
567 if (node != &object->tree_node) { 568 if (node != &object->tree_node) {
568 unsigned long flags;
569
570 kmemleak_stop("Cannot insert 0x%lx into the object search tree " 569 kmemleak_stop("Cannot insert 0x%lx into the object search tree "
571 "(already existing)\n", ptr); 570 "(already existing)\n", ptr);
572 object = lookup_object(ptr, 1); 571 object = lookup_object(ptr, 1);
573 spin_lock_irqsave(&object->lock, flags); 572 spin_lock(&object->lock);
574 dump_object_info(object); 573 dump_object_info(object);
575 spin_unlock_irqrestore(&object->lock, flags); 574 spin_unlock(&object->lock);
576 575
577 goto out; 576 goto out;
578 } 577 }