[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: cpupools and locking

On 04/05/2010 19:51, "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx> wrote:

> Something seems not quite right about the cpupool locking... in
> xen/common/cpupool.c:cpupool_do_domctl(), the cpupool_lock is only
> held during the find for several operations.  Doesn't that mean that,
> for instance, it's possible for someone to call CPUPOOL_OP_DESTROY,
> while someone concurrently calls CPUPOOL_OP_INFO, such that in the
> INFO case, the find succeeds, but the structure is shortly thereafter
> freed by DESTROY, even though INFO code still has a pointer to it
> which may be dereferenced?  I don't see any reference counting... am I
> missing something?

It certainly looks like "optimistic" concurrency control to me. :-)

 -- Keir

>  -George

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.