Re: [PATCH] arm64/efi: Fix kmemleak false positive in arm64_efi_rt_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 13, 2024 at 12:20:31PM -0400, Waiman Long wrote:
> diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> index 4a92096db34e..712718aed5dd 100644
> --- a/arch/arm64/kernel/efi.c
> +++ b/arch/arm64/kernel/efi.c
> @@ -9,6 +9,7 @@
>  
>  #include <linux/efi.h>
>  #include <linux/init.h>
> +#include <linux/kmemleak.h>
>  #include <linux/screen_info.h>
>  #include <linux/vmalloc.h>
>  
> @@ -213,6 +214,7 @@ l:	if (!p) {
>  		return -ENOMEM;
>  	}
>  
> +	kmemleak_not_leak(p);
>  	efi_rt_stack_top = p + THREAD_SIZE;

It looks like a false positive and the reason is that we only store
p + THREAD_SIZE in efi_rt_stack_top, not the actual allocated pointer.

-- 
Catalin




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux