RE: [PATCH v6 2/5] KUnit: KASAN Integration

From: Walter-ZH Wu (åçå)
Date: Mon Apr 20 2020 - 01:43:48 EST


Hi David,

start_report(&flags);
pr_err("BUG: KASAN: double-free or invalid-free in %pS\n", (void *)ip);
print_tags(tag, object);
@@ -486,6 +513,14 @@ void __kasan_report(unsigned long addr, size_t size, bool is_write, unsigned lon
void *untagged_addr;
unsigned long flags;

+ if (likely(!report_enabled()))
+ return;

kasan_report() already has the test expression, it should not need duplicating if statement.


Walter

+
+#if IS_ENABLED(CONFIG_KUNIT)
+ if (current->kunit_test)
+ kasan_update_kunit_status(current->kunit_test);
+#endif /* IS_ENABLED(CONFIG_KUNIT) */
+
disable_trace_on_warning();

tagged_addr = (void *)addr;
--
2.26.1.301.g55bc3eb7cb9-goog

--
You received this message because you are subscribed to the Google Groups "kasan-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@xxxxxxxxxxxxxxxxx
To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20200418031833.234942-3-davidgow%40google.com.