kasan, arm64: only use kasan_depth for software modes
[linux-2.6-microblaze.git] / mm / kasan / report.c
index d140d26..914ab5c 100644 (file)
@@ -292,8 +292,10 @@ static void print_shadow_for_address(const void *addr)
 
 static bool report_enabled(void)
 {
+#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
        if (current->kasan_depth)
                return false;
+#endif
        if (test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags))
                return true;
        return !test_and_set_bit(KASAN_BIT_REPORTED, &kasan_flags);