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-next>] [day] [month] [year] [list]
Message-Id: <1492566442-12608-1-git-send-email-gfree.wind@foxmail.com>
Date:   Wed, 19 Apr 2017 09:47:22 +0800
From:   gfree.wind@...mail.com
To:     jeyu@...hat.com, rusty@...tcorp.com.au,
        linux-kernel@...r.kernel.org
Cc:     Gao Feng <fgao@...ai8.com>
Subject: [PATCH] module: Unify the return value type of try_module_get

From: Gao Feng <fgao@...ai8.com>

The prototypes of try_module_get are different with different macro.
When enable module and module unload, it returns bool, but others not.
Now unify their return value type as bool.

Signed-off-by: Gao Feng <fgao@...ai8.com>
---
 include/linux/module.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index 0297c5c..6b79eb7 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -582,7 +582,7 @@ extern void __noreturn __module_put_and_exit(struct module *mod,
 extern void module_put(struct module *module);
 
 #else /*!CONFIG_MODULE_UNLOAD*/
-static inline int try_module_get(struct module *module)
+static inline bool try_module_get(struct module *module)
 {
 	return !module || module_is_live(module);
 }
@@ -674,9 +674,9 @@ static inline void __module_get(struct module *module)
 {
 }
 
-static inline int try_module_get(struct module *module)
+static inline bool try_module_get(struct module *module)
 {
-	return 1;
+	return true;
 }
 
 static inline void module_put(struct module *module)
-- 
1.9.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ