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: <20141118141212.07b64fdd2f32e8d3b0f725cb@linux-foundation.org>
Date:	Tue, 18 Nov 2014 14:12:12 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:	Minchan Kim <minchan@...nel.org>,
	Mahendran Ganesh <opensource.ganesh@...il.com>,
	Nitin Gupta <ngupta@...are.org>, linux-mm@...ck.or,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zsmalloc: fix zs_init cpu notifier error handling

On Fri, 14 Nov 2014 21:57:06 +0900 Sergey Senozhatsky <sergey.senozhatsky@...il.com> wrote:

> Mahendran Ganesh reported that zpool-enabled zsmalloc should not
> call zpool_unregister_driver() from zs_init() if cpu notifier
> registration has failed, because error handling is performed
> before we register the driver via zpool_register_driver() call.
> 
> Factor out cpu notifier registration and unregistration code and
> fix zs_init() error handling.


So we can now do this, yes?

--- a/mm/zsmalloc.c~mm-zsmallocc-use-__init-and-__exit
+++ a/mm/zsmalloc.c
@@ -911,7 +911,7 @@ static int zs_register_cpu_notifier(void
 	return notifier_to_errno(ret);
 }
 
-static void zs_exit(void)
+static void __exit zs_exit(void)
 {
 #ifdef CONFIG_ZPOOL
 	zpool_unregister_driver(&zs_zpool_driver);
@@ -919,7 +919,7 @@ static void zs_exit(void)
 	zs_unregister_cpu_notifier();
 }
 
-static int zs_init(void)
+static int __init zs_init(void)
 {
 	int ret = zs_register_cpu_notifier();
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ