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
| ||
|
Date: Fri, 14 Mar 2008 12:06:04 +0000 From: David Howells <dhowells@...hat.com> To: torvalds@...l.org, akpm@...ux-foundation.org, kwc@...i.umich.edu Cc: arunsr@....iitk.ac.in, dwalsh@...hat.com, linux-security-module@...r.kernel.org, dhowells@...hat.com, linux-kernel@...r.kernel.org Subject: [PATCH 2/2] KEYS: Make key_serial() a function if CONFIG_KEYS=y [try #2] Make key_serial() an inline function rather than a macro if CONFIG_KEYS=y. This prevents double evaluation of the key pointer and also provides better type checking. Signed-off-by: David Howells <dhowells@...hat.com> --- include/linux/key.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/key.h b/include/linux/key.h index ad02d9c..c45c962 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -264,7 +264,10 @@ extern int keyring_add_key(struct key *keyring, extern struct key *key_lookup(key_serial_t id); -#define key_serial(key) ((key) ? (key)->serial : 0) +static inline key_serial_t key_serial(struct key *key) +{ + return key ? key->serial : 0; +} #ifdef CONFIG_SYSCTL extern ctl_table key_sysctls[]; -- 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