lkml.org 
[lkml]   [2021]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: arm64: remove incorrect __init annotation
On Sun, 03 Jan 2021 14:00:50 +0000,
Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> When hyp_cpu_pm_exit() is not inlined, it causes a link time warning:
>
> WARNING: modpost: vmlinux.o(.text+0x39974): Section mismatch in reference from the function kvm_arch_init() to the function .init.text:hyp_cpu_pm_exit()
> The function kvm_arch_init() references
> the function __init hyp_cpu_pm_exit().
> This is often because kvm_arch_init lacks a __init
> annotation or the annotation of hyp_cpu_pm_exit is wrong.
>
> This is not only called at boot time, so remove the annotation
> to prevent undefined behavior in case it gets called after being
> freed.

It *is* only called at boot time (despite these functions being called
from module_init(), KVM cannot be built as a module on arm64).

The annotations are wrong nonetheless.

>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Posted here [1], and queued for the next batch of fixes.

M.

[1] https://lore.kernel.org/linux-arm-kernel/20201223120854.255347-1-maz@kernel.org

--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2021-01-03 17:45    [W:0.040 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site