lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aV4wO1ORACvVpgAN@kernel.org>
Date: Wed, 7 Jan 2026 12:06:51 +0200
From: Mike Rapoport <rppt@...nel.org>
To: l00580197 <longwei27@...wei.com>
Cc: Alexander Graf <graf@...zon.com>,
	Pasha Tatashin <pasha.tatashin@...een.com>,
	Pratyush Yadav <pratyush@...nel.org>, kexec@...ts.infradead.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	hewenliang4@...wei.com
Subject: Re: [PATCH] kho: test: clean up residual memory upon test_kho module
 unload

On Wed, Jan 07, 2026 at 10:24:27AM +0800, l00580197 wrote:
> From: Long Wei <longwei27@...wei.com>
> 
> During the initialization phase, the test_kho module invokes the
> kho_preserve_folio function, which internally configures bitmaps
> within kho_mem_track and establishes chunk linked lists in KHO.
> Upon unloading the test_kho module, it is necessary to clean up
> these states.
> 
> Signed-off-by: Long Wei <longwei27@...wei.com>

Acked-by: Mike Rapoport (Microsoft) <rppt@...nel.org>

> ---
>  lib/test_kho.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/test_kho.c b/lib/test_kho.c
> index 47de56280795..69230da5a056 100644
> --- a/lib/test_kho.c
> +++ b/lib/test_kho.c
> @@ -339,11 +339,15 @@ module_init(kho_test_init);
>  
>  static void kho_test_cleanup(void)
>  {
> +	/* unpreserve and free the data stored in folios */
> +	kho_test_unpreserve_data(&kho_test_state);
>  	for (int i = 0; i < kho_test_state.nr_folios; i++)
>  		folio_put(kho_test_state.folios[i]);
>  
>  	kvfree(kho_test_state.folios);
> -	vfree(kho_test_state.folios_info);
> +
> +	/* Unpreserve and release the FDT folio */
> +	kho_unpreserve_folio(kho_test_state.fdt);
>  	folio_put(kho_test_state.fdt);
>  }
>  
> -- 
> 2.43.0
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ