[Spice-devel] [PATCH 06/14] FIXME/HACK: RedPipeItem/VDIPortBuf refcounting hack

Fergeau, Christophe cfergeau at redhat.com
Fri Apr 8 09:29:45 UTC 2016


On Fri, Apr 08, 2016 at 09:48:32AM +0200, Pavel Grunt wrote:
> Hi,
> 
> On Thu, 2016-04-07 at 17:11 -0500, Jonathon Jongsma wrote:
> > From: Christophe Fergeau<cfergeau at redhat.com>
> > 
> > related to 7d375e0
> > workaround a runtime check in red_pipe_item_ref()
> 
> Should the refcount be initialized by red_pipe_item_init?

It is, the trick with VDIReadBuf is that they are stored in a list of
preallocated, when refcounts drops to 0, the buffer is placed back in
the static list, so when we try to reuse it, refcount is 0, and we try
to resurrect it, which is not expected as the code is now.
Definitely not saying this commit is the right way of handling things
though given the name ;) Maybe we should just have a list of dynamically
allocated VDIReadBuf, maybe we should do something different.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160408/ffe1dc5d/attachment.sig>


More information about the Spice-devel mailing list