Messages in this thread Patch in this message | | | From | Walter-ZH Wu (吳祖寰) <> | Subject | RE: [PATCH v6 2/5] KUnit: KASAN Integration | Date | Mon, 20 Apr 2020 05:43:40 +0000 |
| |
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@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20200418031833.234942-3-davidgow%40google.com.
| |