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-next>] [day] [month] [year] [list]
Date:	Sat, 24 Jan 2015 21:48:41 +0800
From:	Ganesh Mahendran <opensource.ganesh@...il.com>
To:	minchan@...nel.org, ngupta@...are.org
Cc:	akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Ganesh Mahendran <opensource.ganesh@...il.com>
Subject: [PATCH] mm/zsmalloc: add log for module load/unload

Sometimes, we want to know whether a module is loaded or unloaded
from the log.

This patch adds some log.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
Cc: Nitin Gupta <ngupta@...are.org>
Cc: Minchan Kim <minchan@...nel.org>
---
 mm/zsmalloc.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2d5f5be..16617e9 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -72,6 +72,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #ifdef CONFIG_ZSMALLOC_DEBUG
 #define DEBUG
 #endif
@@ -1460,6 +1462,8 @@ static int __init zs_init(void)
 {
 	int ret = zs_register_cpu_notifier();
 
+	pr_info("loaded\n");
+
 	if (ret)
 		goto notifier_fail;
 
@@ -1474,6 +1478,7 @@ static int __init zs_init(void)
 		pr_err("zs stat initialization failed\n");
 		goto stat_fail;
 	}
+
 	return 0;
 
 stat_fail:
@@ -1483,6 +1488,8 @@ stat_fail:
 notifier_fail:
 	zs_unregister_cpu_notifier();
 
+	pr_info("unloaded\n");
+
 	return ret;
 }
 
-- 
1.7.9.5

--
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