/* Look up an object in the prio search tree and increase its use_count.  */
static struct kmemleak_object* find_and_get_object(unsigned long ptr, int alias)
/* Look up an object in the prio search tree and increase its use_count.  */
static struct kmemleak_object* find_and_get_object(unsigned long ptr, int alias)
{
	unsigned long flags;
	struct kmemleak_object *object = NULL;
	rcu_read_lock();
	read_lock_irqsave(&kmemleak_lock, flags);
	if (ptr >= min_addr && ptr < max_addr)
		object = lookup_object(ptr, alias);
	read_unlock_irqrestore(&kmemleak_lock, flags);
	if (object && !get_object(object))
		object = NULL;
	rcu_read_unlock();
	return object;
}