[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150206122802.GT3702@8bytes.org>
Date: Fri, 6 Feb 2015 13:28:02 +0100
From: Joerg Roedel <joro@...tes.org>
To: Jiang Liu <jiang.liu@...ux.intel.com>
Cc: Joerg Roedel <jroedel@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Prarit Bhargava <prarit@...hat.com>,
Yinghai Lu <yinghai@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org, alnovak@...e.com
Subject: Re: [PATCH] x86: irq: Check for valid irq descriptor in
check_irq_vectors_for_cpu_disable
Hi Jiang,
On Thu, Feb 05, 2015 at 01:51:26PM +0800, Jiang Liu wrote:
> Reviewed-by: Jiang Liu <jiang.liu@...ux.intel.com>
Thanks for your review.
> Actually there's another racing pattern.
> for (irq = 0; irq < nr_irqs; irq++) {
> desc = irq_to_desc(irq);
> access desc->xxx
> }
>
> When sparsing IRQ is enabled, there's no mechanism to protect
> desc returned by irq_to_desc(). Once I have considered a brute
> solution of disabling freeing of irq_desc:(
Hmm, how about wrapping the places that use irq_desc in rcu_read_lock()
and do a synchronize_rcu() before we free it (at least in the SPARSE_IRQ
case)? It wouldn't be a real RCU data structure, but we make at least
sure that we don't free an irq_desc thats in use.
Joerg
--
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