/* Set the OBJECT_NO_SCAN flag for the object corresponding to the give pointer. Such object will not be scanned by kmemleak but references to it are searched.  */
static void object_no_scan(unsigned long ptr)
/* Set the OBJECT_NO_SCAN flag for the object corresponding to the give pointer. Such object will not be scanned by kmemleak but references to it are searched.  */
static void object_no_scan(unsigned long ptr)
{
	unsigned long flags;
	struct kmemleak_object *object;
	object = find_and_get_object(ptr, 0);
	if (!object) {
		kmemleak_warn("Not scanning unknown object at 0x%08lx\n", ptr);
		return;
	}
	spin_lock_irqsave(&object->lock, flags);
	object->flags |= OBJECT_NO_SCAN;
	spin_unlock_irqrestore(&object->lock, flags);
	put_object(object);
}