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

Re: [Xen-devel] evtchn_resize_ring() serialization

On 04/05/16 14:38, Jan Beulich wrote:
>>>> On 04.05.16 at 15:14, <david.vrabel@xxxxxxxxxx> 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.


Xen-devel mailing list



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