linux-stable/arch
Sean Christopherson 58608e80d6 x86/irq: Ensure PI wakeup handler is unregistered before module unload
commit 6ff53f6a43 upstream.

Add a synchronize_rcu() after clearing the posted interrupt wakeup handler
to ensure all readers, i.e. in-flight IRQ handlers, see the new handler
before returning to the caller.  If the caller is an exiting module and
is unregistering its handler, failure to wait could result in the IRQ
handler jumping into an unloaded module.

The registration path doesn't require synchronization, as it's the
caller's responsibility to not generate interrupts it cares about until
after its handler is registered.

Fixes: f6b3c72c23 ("x86/irq: Define a global vector for VT-d Posted-Interrupts")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211009001107.3936588-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-17 09:48:19 +01:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-09-30 10:09:26 +02:00
arc ARC: export clear_user_page() for modules 2021-09-22 12:26:45 +02:00
arm ARM: 9141/1: only warn about XIP address when not compile testing 2021-11-02 19:46:11 +01:00
arm64 arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node 2021-11-02 19:46:13 +01:00
c6x
csky csky: Fixup regs.sr broken in ptrace 2021-10-20 11:40:12 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 10:35:18 +01:00
hexagon hexagon: use common DISCARDS macro 2021-07-20 16:10:50 +02:00
ia64 ia64: mca_drv: fix incorrect array size calculation 2021-07-14 16:53:19 +02:00
m68k m68k: Handle arrivals of multiple signals correctly 2021-10-17 10:42:34 +02:00
microblaze
mips bpf, mips: Validate conditional branch offsets 2021-10-13 10:08:17 +02:00
nds32 nds32: fix up stack guard gap 2021-07-28 13:31:01 +02:00
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-11-02 19:46:14 +01:00
openrisc openrisc: don't printk() unconditionally 2021-09-22 12:26:24 +02:00
parisc parisc: Fix ptrace check on syscall return 2021-11-17 09:48:17 +01:00
powerpc powerpc/bpf: Fix BPF_MOD when imm == 1 2021-11-02 19:46:11 +01:00
riscv RISC-V: Include clone3() on rv32 2021-10-13 10:08:20 +02:00
s390 KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu 2021-11-02 19:46:15 +01:00
sh sh: dma: fix kconfig dependency for G2_DMA 2021-01-27 11:47:52 +01:00
sparc sparc64: fix pci_iounmap() when CONFIG_PCI is not set 2021-10-09 14:39:49 +02:00
um um: virtio_uml: fix memory leak on init failures 2021-09-26 14:07:08 +02:00
unicore32
x86 x86/irq: Ensure PI wakeup handler is unregistered before module unload 2021-11-17 09:48:19 +01:00
xtensa xtensa: xtfpga: Try software restart before simulating CPU reset 2021-10-27 09:54:25 +02:00
.gitignore
Kconfig Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" 2020-12-30 11:51:47 +01:00