From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Juergen Gross <JGross@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: evtchn_resize_ring() serialization
Date: Wed, 4 May 2016 14:42:15 +0100 [thread overview]
Message-ID: <5729FC37.3080206@citrix.com> (raw)
In-Reply-To: <572A176702000078000E892F@prv-mh.provo.novell.com>
On 04/05/16 14:38, Jan Beulich wrote:
>>>> On 04.05.16 at 15:14, <david.vrabel@citrix.com> wrote:
>> On 04/05/16 14:08, Jan Beulich wrote:
>>> David,
>>>
>>> in the course of putting together the fix just sent I got puzzled by the
>>> apparent raciness of the initial part of evtchn_resize_ring(). Is it
>>> intentional that the function relies on being implicitly serialized via the
>>> bind mutex?
>>
>> Yes.
>>
>> Although, I'm not sure I'd call it "implicit", as I think the bind_mutex
>> rather explicitly serializes bind operations (which may include resizing
>> the ring).
>
> Well, that's only if you assume that re-sizing is something which can
> only ever happen in the context of binding. As said - I had looked at
> the function in isolation first; nothing says it's a helper for just one
> very specific operation.
You could add a comment saying "u->bind_mutex must be locked" if you
think it will help.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-05-04 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 13:08 evtchn_resize_ring() serialization Jan Beulich
2016-05-04 13:14 ` David Vrabel
2016-05-04 13:38 ` Jan Beulich
2016-05-04 13:42 ` David Vrabel [this message]
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=5729FC37.3080206@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=JGross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=xen-devel@lists.xenproject.org \
/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.