Re: [PATCH] mm,kmemleak-test: add the dependency on CONFIG_SAMPLES

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

 



On Wed, May 26, 2021 at 10:10:08AM +0800, chenxiang wrote:
> From: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>
> 
> As kmemleak-test.c is moved to samples dir, it is not compiled if just
> setting CONFIG_DEBUG_KMEMLEAK_TEST as module and enabling
> CONFIG_DEBUG_KMEMLEAK. Because it depends on CONFIG_SAMPLES after it is
> moved to samples dir.
> So the dependency on CONFIG_SAMPLES is added.
> 
> Fixes: 1abbef4f5172 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir")
> Signed-off-by: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>
> ---
>  lib/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 2779c29..9950542 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -716,7 +716,7 @@ config DEBUG_KMEMLEAK_MEM_POOL_SIZE
>  
>  config DEBUG_KMEMLEAK_TEST
>  	tristate "Simple test for the kernel memory leak detector"
> -	depends on DEBUG_KMEMLEAK && m
> +	depends on DEBUG_KMEMLEAK && SAMPLES && m
>  	help
>  	  This option enables a module that explicitly leaks memory.

Would it make more sense to move the DEBUG_KMEMLEAK_TEST option to
samples as well and maybe rename it to SAMPLES_KMEMLEAK?

-- 
Catalin



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux