On 02/26/2016 07:48 PM, Alexander Potapenko wrote:
> Signed-off-by: Alexander Potapenko <[email protected]>
> ---
>  lib/test_kasan.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Andrey Ryabinin <[email protected]>

> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
> index 90ad74f..82169fb 100644
> --- a/lib/test_kasan.c
> +++ b/lib/test_kasan.c
> @@ -294,6 +294,8 @@ static noinline void __init kmalloc_uaf2(void)
>       }
>  
>       ptr1[40] = 'x';
> +     if (ptr1 == ptr2)
> +             pr_err("Could not detect use-after-free: ptr1 == ptr2\n");
>       kfree(ptr2);
>  }
>  
> 

Reply via email to