From: David Rientjes Date: Thu, 4 Oct 2012 13:22:21 +0000 (+0100) Subject: MODSIGN: Fix build error with strict typechecking X-Git-Tag: next-20121008~41^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=21536bb994be78dc6451c93055531da2c84ce5d1;p=karo-tx-linux.git MODSIGN: Fix build error with strict typechecking "MODSIGN: Provide module signing public keys to the kernel" causes a build error when CONFIG_UIDGID_STRICT_TYPE_CHECKS is enabled: kernel/modsign_pubkey.c: In function 'module_verify_init': kernel/modsign_pubkey.c:47: error: incompatible type for argument 3 of 'key_alloc' include/linux/key.h:195: note: expected 'kuid_t' but argument is of type 'int' kernel/modsign_pubkey.c:47: error: incompatible type for argument 4 of 'key_alloc' include/linux/key.h:195: note: expected 'kgid_t' but argument is of type 'int' Cast the parameters accordingly. Signed-off-by: David Rientjes Signed-off-by: Rusty Russell --- diff --git a/kernel/modsign_pubkey.c b/kernel/modsign_pubkey.c index f504d9f69613..4646eb2c3820 100644 --- a/kernel/modsign_pubkey.c +++ b/kernel/modsign_pubkey.c @@ -41,7 +41,8 @@ static __init int module_verify_init(void) pr_notice("Initialise module verification\n"); modsign_keyring = key_alloc(&key_type_keyring, ".module_sign", - 0, 0, current_cred(), + KUIDT_INIT(0), KGIDT_INIT(0), + current_cred(), (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW | KEY_USR_READ, KEY_ALLOC_NOT_IN_QUOTA);