From: "Jan Beulich" Subject: Re: [PATCH] x86/IRQ: fix create_irq() after c/s 24068:6928172f7ded Date: Fri, 04 Nov 2011 15:05:16 +0000 Message-ID: <4EB40D3C020000780005F192@nat28.tlf.novell.com> References: <4EB3E02B020000780005F027@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: andrew.cooper3@citrix.com, "xen-devel@lists.xensource.com" , Haitao Shan , xiantao.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 04.11.11 at 15:41, Keir Fraser wrote: > On 04/11/2011 11:52, "Jan Beulich" wrote: >=20 >> init_one_irq_desc() must be called with interrupts enabled (as it may >> call functions from the xmalloc() group). Rather than mis-using >> vector_lock to also protect the finding of an unused IRQ, make this >> lockless through using cmpxchg(), and obtain the lock only around the >> actual assignment of the vector. >=20 > Looks fine to me. >=20 > Acked-by: Keir Fraser >=20 >> Also fold find_unassigned_irq() into its only caller. >>=20 >> It is, btw, questionable whether create_irq() calling >> __assign_irq_vector() (rather than assign_irq_vector()) is actually >> correct - desc->affinity appears to not get initialized properly in >> this case. Any thought on this one? Adjusting this would have the nice side effect of the function no longer explicitly acquiring vector_lock. Jan