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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160706082005.GA3922@leo-test>
Date:	Wed, 6 Jul 2016 16:20:05 +0800
From:	Ganesh Mahendran <opensource.ganesh@...il.com>
To:	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc:	akpm@...ux-foundation.org, minchan@...nel.org, ngupta@...are.org,
	sergey.senozhatsky.work@...il.com, rostedt@...dmis.org,
	mingo@...hat.com
Subject: Re: [PATCH v3 6/8] mm/zsmalloc: add __init,__exit attribute

On Wed, Jul 06, 2016 at 02:23:51PM +0800, Ganesh Mahendran wrote:
> Add __init,__exit attribute for function that only called in
> module init/exit to save memory.
> 
> Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
> ----
> v3:
>     revert change in v2 - Sergey
> v2:
>     add __init/__exit for zs_register_cpu_notifier/zs_unregister_cpu_notifier
> ---
>  mm/zsmalloc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index ded312b..46526b9 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1344,7 +1344,7 @@ static void zs_unregister_cpu_notifier(void)
>  	cpu_notifier_register_done();
>  }
>  
> -static void init_zs_size_classes(void)
> +static void __init init_zs_size_classes(void)
>  {
>  	int nr;
>  
> @@ -1887,7 +1887,7 @@ static struct file_system_type zsmalloc_fs = {
>  	.kill_sb	= kill_anon_super,
>  };
>  
> -static int zsmalloc_mount(void)
> +static int __init zsmalloc_mount(void)
>  {
>  	int ret = 0;
>  
> @@ -1898,7 +1898,7 @@ static int zsmalloc_mount(void)
>  	return ret;
>  }
>  
> -static void zsmalloc_unmount(void)
> +static void __exit zsmalloc_unmount(void)
>  {
>  	kern_unmount(zsmalloc_mnt);
>  }

Sorry, the __exit zsmalloc_umount is called in __init zs_init.

updated patch is :

---
>From 0980a277158958210b671b79e9ddf98699dd6b50 Mon Sep 17 00:00:00 2001
From: Ganesh Mahendran <opensource.ganesh@...il.com>
Date: Fri, 1 Jul 2016 14:05:50 +0800
Subject: [PATCH] mm/zsmalloc: add __init,__exit attribute

Add __init,__exit attribute for function that only called in
module init/exit to save memory.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
----
v4:
    remove __init/__exit for zsmalloc_mount/zsmalloc_umount
v3:
    revert change in v2 - Sergey
v2:
    add __init/__exit for zs_register_cpu_notifier/zs_unregister_cpu_notifier
---
 mm/zsmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index ded312b..780eabd 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1344,7 +1344,7 @@ static void zs_unregister_cpu_notifier(void)
 	cpu_notifier_register_done();
 }
 
-static void init_zs_size_classes(void)
+static void __init init_zs_size_classes(void)
 {
 	int nr;
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ