[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1512291437450.28591@nanos>
Date: Tue, 29 Dec 2015 14:39:46 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Jiang Liu <jiang.liu@...ux.intel.com>
cc: Joe Lawrence <joe.lawrence@...atus.com>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Jeremiah Mahler <jmmahler@...il.com>,
Borislav Petkov <bp@...en8.de>, andy.shevchenko@...il.com,
Guenter Roeck <linux@...ck-us.net>,
linux-kernel@...r.kernel.org
Subject: Re: [Bugfix v2 3/5] x86/irq: Fix a race window in
x86_vector_free_irqs()
On Wed, 23 Dec 2015, Jiang Liu wrote:
> void init_irq_alloc_info(struct irq_alloc_info *info,
> @@ -279,18 +272,21 @@ static void x86_vector_free_irqs(struct irq_domain *domain,
> unsigned int virq, unsigned int nr_irqs)
> {
> struct irq_data *irq_data;
> + unsigned long flags;
> int i;
>
> for (i = 0; i < nr_irqs; i++) {
> irq_data = irq_domain_get_irq_data(x86_vector_domain, virq + i);
> if (irq_data && irq_data->chip_data) {
> + raw_spin_lock_irqsave(&vector_lock, flags);
> clear_irq_vector(virq + i, irq_data->chip_data);
> free_apic_chip_data(irq_data->chip_data);
> + irq_domain_reset_irq_data(irq_data);
> + raw_spin_unlock_irqrestore(&vector_lock, flags);
We really do not need to free stuff under the vector lock.
lock();
data = irq_data->chip_data;
irq_domain_reset_irq_data(irq_data);
unlock();
free_apic_chip_data(data);
Hmm?
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists