]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - lib/test_kasan.c
mm/cma_debug.c: remove static scoped cma_debugfs_root
[linux.git] / lib / test_kasan.c
index 51b78405bf24b7e4ae62168387f4b659c41bb110..7de2702621dc10ce0fe77617e5e4cd4573c7814f 100644 (file)
@@ -480,29 +480,6 @@ static noinline void __init copy_user_test(void)
        kfree(kmem);
 }
 
-static noinline void __init use_after_scope_test(void)
-{
-       volatile char *volatile p;
-
-       pr_info("use-after-scope on int\n");
-       {
-               int local = 0;
-
-               p = (char *)&local;
-       }
-       p[0] = 1;
-       p[3] = 1;
-
-       pr_info("use-after-scope on array\n");
-       {
-               char local[1024] = {0};
-
-               p = local;
-       }
-       p[0] = 1;
-       p[1023] = 1;
-}
-
 static noinline void __init kasan_alloca_oob_left(void)
 {
        volatile int i = 10;
@@ -682,7 +659,6 @@ static int __init kmalloc_tests_init(void)
        kasan_alloca_oob_right();
        ksize_unpoisons_memory();
        copy_user_test();
-       use_after_scope_test();
        kmem_cache_double_free();
        kmem_cache_invalid_free();
        kasan_memchr();