mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
integrity: Fix __integrity_init_keyring() section mismatch
With gcc-4.6.3:
WARNING: vmlinux.o(.text.unlikely+0x24c64): Section mismatch in reference from the function __integrity_init_keyring() to the function .init.text:set_platform_trusted_keys()
The function __integrity_init_keyring() references
the function __init set_platform_trusted_keys().
This is often because __integrity_init_keyring lacks a __init
annotation or the annotation of set_platform_trusted_keys is wrong.
Indeed, if the compiler decides not to inline __integrity_init_keyring(),
a warning is issued.
Fix this by adding the missing __init annotation.
Fixes: 9dc92c4517 ("integrity: Define a trusted platform keyring")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Nayna Jain <[email protected]>
Reviewed-by: James Morris <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
This commit is contained in:
parent
e038f5f691
commit
8c655784e2
1 changed files with 3 additions and 2 deletions
|
|
@ -73,8 +73,9 @@ int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen,
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int __integrity_init_keyring(const unsigned int id, key_perm_t perm,
|
||||
struct key_restriction *restriction)
|
||||
static int __init __integrity_init_keyring(const unsigned int id,
|
||||
key_perm_t perm,
|
||||
struct key_restriction *restriction)
|
||||
{
|
||||
const struct cred *cred = current_cred();
|
||||
int err = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue