From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>,
Keir Fraser <Keir.Fraser@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: cpupools and locking
Date: Wed, 05 May 2010 07:25:51 +0200 [thread overview]
Message-ID: <4BE1015F.8050901@ts.fujitsu.com> (raw)
In-Reply-To: <w2jde76405a1005041151lded10645z70c2ed600e0728a1@mail.gmail.com>
On 05/04/2010 08:51 PM, George Dunlap 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?
cpupool_do_domctl is called always while the domctl lock is being held. Maybe
I should have added a comment to document this assumption.
Keir's patch to move the cpupool commands to the sysctl interface makes a
change of the locking mandatory. I'll setup a patch for this.
Juergen
--
Juergen Gross Principal Developer Operating Systems
TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
next prev parent reply other threads:[~2010-05-05 5:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 18:51 cpupools and locking George Dunlap
2010-05-04 21:52 ` Keir Fraser
2010-05-05 5:25 ` Juergen Gross [this message]
2010-05-05 9:00 ` Keir Fraser
2010-05-05 11:07 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE1015F.8050901@ts.fujitsu.com \
--to=juergen.gross@ts.fujitsu.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Keir.Fraser@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.