]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
x86/idt: Annotate alloc_intr_gate() with __init
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 28 Apr 2020 09:38:23 +0000 (11:38 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 13:14:33 +0000 (15:14 +0200)
commit06184325a1cce27a02a688d98740f90fe06e0133
tree4122eff80df1091f767a701fdebb655ee8259290
parenta0bb51f2638e0810c347024679239fd10a8f7990
x86/idt: Annotate alloc_intr_gate() with __init

There seems to be no reason to allocate interrupt gates after init. Mark
alloc_intr_gate() as __init and add WARN_ON() checks making sure it is
only used before idt_setup_apic_and_irq_gates() finalizes IDT setup and
maps all un-allocated entries to spurious entries.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200428093824.1451532-3-vkuznets@redhat.com
arch/x86/kernel/idt.c