>From 57d8543ea4dcf2a53b1c37757da12866a52aaf57 Mon Sep 17 00:00:00 2001 From: Dou Liyang Date: Thu, 28 Dec 2017 16:20:48 +0800 Subject: [PATCH] x86/vector: Replace the raw_spin_lock() with raw_spin_lock_irqsave() Signed-off-by: Dou Liyang --- arch/x86/kernel/apic/vector.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 750449152b04..a43ca26d5dfd 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -726,6 +726,7 @@ static int apic_set_affinity(struct irq_data *irqd, const struct cpumask *dest, bool force) { struct apic_chip_data *apicd = apic_chip_data(irqd); + unsigned long flags; int err; /* @@ -740,13 +741,13 @@ static int apic_set_affinity(struct irq_data *irqd, (apicd->is_managed || apicd->can_reserve)) return IRQ_SET_MASK_OK; - raw_spin_lock(&vector_lock); + raw_spin_lock_irqsave(&vector_lock, flags); cpumask_and(vector_searchmask, dest, cpu_online_mask); if (irqd_affinity_is_managed(irqd)) err = assign_managed_vector(irqd, vector_searchmask); else err = assign_vector_locked(irqd, vector_searchmask); - raw_spin_unlock(&vector_lock); + raw_spin_unlock_irqrestore(&vector_lock, flags); return err ? err : IRQ_SET_MASK_OK; } -- 2.14.3