From: Michael Kelley <[email protected]>

handle_percpu_devid_irq() is a version of handle_percpu_irq() but with
the addition of a pointer to a per-cpu devid. However, handle_percpu_irq()
does add_interrupt_randomness(), while handle_percpu_devid_irq() currently
does not. Add the missing add_interrupt_randomness(), as it is needed
when per-cpu interrupts with devid's are used in VMs for interrupts
from the hypervisor.

Signed-off-by: Michael Kelley <[email protected]>
---
 kernel/irq/chip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 6147a07d0127..6c9b1dc4e7d4 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -14,6 +14,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/irqdomain.h>
+#include <linux/random.h>
 
 #include <trace/events/irq.h>
 
@@ -929,6 +930,8 @@ void handle_percpu_devid_irq(struct irq_desc *desc)
                            enabled ? " and unmasked" : "", irq, cpu);
        }
 
+       add_interrupt_randomness(irq);
+
        if (chip->irq_eoi)
                chip->irq_eoi(&desc->irq_data);
 }
-- 
2.25.1


Reply via email to