]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
integrity: Fix __integrity_init_keyring() section mismatch
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 17 Jun 2019 07:44:52 +0000 (09:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:36 +0000 (09:12 +0200)
commit1d0d6eb472501edac2627103b1d019ecdae62d03
treeb762ecbed6e2171a9e62f50eebe618beb650d82b
parent5536b0ee5b8ef1342514be2b97eec8d8c719b778
integrity: Fix __integrity_init_keyring() section mismatch

[ Upstream commit 8c655784e2cf59cb6140759b8b546d98261d1ad9 ]

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: 9dc92c45177ab70e ("integrity: Define a trusted platform keyring")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Nayna Jain <nayna@linux.ibm.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/integrity/digsig.c