[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 09/10] ARM: vGIC: introduce vgic_get/put_pending_irq
On Thu, 4 May 2017, Julien Grall wrote: > > @@ -28,11 +27,20 @@ static inline int > > local_events_need_delivery_nomask(void) > > * case. > > */ > > if ( gic_events_need_delivery() ) > > - return 1; > > + { > > + ret = 1; > > + } > > + else > > + { > > + struct pending_irq *p; > > > > - if ( vcpu_info(current, evtchn_upcall_pending) && > > - list_empty(&p->inflight) ) > > - return 1; > > + p = vgic_get_pending_irq(current->domain, current, > > + current->domain->arch.evtchn_irq); > > + if ( vcpu_info(current, evtchn_upcall_pending) && > > + list_empty(&p->inflight) ) > > + ret = 1; > > + vgic_put_pending_irq(current->domain, p); > > Looking at this code, I think there are a race condition. Because nothing > protect list_empty(&p->inflight) (this could be modified by another physical > vCPU at the same time). > > Although, I don't know if this is really an issue. Stefano do you have an > opinion? I only gave a cursory look at the series, but I think you are right. This access to inflight needs to be protected. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |