diff options
Diffstat (limited to 'lib/test_kasan.c')
-rw-r--r-- | lib/test_kasan.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 51b78405bf24..7de2702621dc 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c | |||
@@ -480,29 +480,6 @@ static noinline void __init copy_user_test(void) | |||
480 | kfree(kmem); | 480 | kfree(kmem); |
481 | } | 481 | } |
482 | 482 | ||
483 | static noinline void __init use_after_scope_test(void) | ||
484 | { | ||
485 | volatile char *volatile p; | ||
486 | |||
487 | pr_info("use-after-scope on int\n"); | ||
488 | { | ||
489 | int local = 0; | ||
490 | |||
491 | p = (char *)&local; | ||
492 | } | ||
493 | p[0] = 1; | ||
494 | p[3] = 1; | ||
495 | |||
496 | pr_info("use-after-scope on array\n"); | ||
497 | { | ||
498 | char local[1024] = {0}; | ||
499 | |||
500 | p = local; | ||
501 | } | ||
502 | p[0] = 1; | ||
503 | p[1023] = 1; | ||
504 | } | ||
505 | |||
506 | static noinline void __init kasan_alloca_oob_left(void) | 483 | static noinline void __init kasan_alloca_oob_left(void) |
507 | { | 484 | { |
508 | volatile int i = 10; | 485 | volatile int i = 10; |
@@ -682,7 +659,6 @@ static int __init kmalloc_tests_init(void) | |||
682 | kasan_alloca_oob_right(); | 659 | kasan_alloca_oob_right(); |
683 | ksize_unpoisons_memory(); | 660 | ksize_unpoisons_memory(); |
684 | copy_user_test(); | 661 | copy_user_test(); |
685 | use_after_scope_test(); | ||
686 | kmem_cache_double_free(); | 662 | kmem_cache_double_free(); |
687 | kmem_cache_invalid_free(); | 663 | kmem_cache_invalid_free(); |
688 | kasan_memchr(); | 664 | kasan_memchr(); |