Re: [PATCH 06/14] FIXME/HACK: RedPipeItem/VDIPortBuf refcounting hack

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

 



> 
> 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@xxxxxxxxxx>
> > > 
> > > 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
> 

I would actually call ref_pipe_item_init again. After calling free_func
object should be considered freed so calling init again sounds
reasonable.
I would merge this in the previous patch.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]