vfree: add debug might_sleep()
[muen/linux.git] / mm / vmalloc.c
index d00d42d6bf79f0561b3f84224b51a0389db8172d..97d4b25d0373102a197ba1de455a944cf7204061 100644 (file)
@@ -1587,6 +1587,8 @@ void vfree(const void *addr)
 
        kmemleak_free(addr);
 
+       might_sleep_if(!in_interrupt());
+
        if (!addr)
                return;
        if (unlikely(in_interrupt()))