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

Re: [Xen-devel] [PATCH v12 1/2] libxl: add support for vscsi

On 14/04/16 16:27, Olaf Hering wrote:
> On Thu, Apr 14, Juergen Gross wrote:
>> On 13/04/16 10:56, Olaf Hering wrote:
>>> +    back = flexarray_make(gc, i, 1);
>> Shouldn't be this in the loop below? Otherwise the array might be
>> expanded with the same entries several times in case of a transaction
>> collision.
> I think the result would be like 'echo val > path ; echo val > path'.
> But in theory one iteration could enter XenbusStateConnected, and a
> following one another state. In practice this would be
> XenbusStateReconfiguring and the loop is done.
> What would be the way to free a flexarray? Looks like flexarray_free
> would lead to a double free if the gc itself is finally freed. Just
> overwriting 'back' would work, but does Coverity understand that the
> previous back is not leaked?

Overwriting the array pointer is done in other places already. Seems
as if this would be the way to go. See device_disk_add() in libxl.c


Xen-devel mailing list



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