Re: [Spice-devel] [PATCH] Use RING_FOREACH_SAFE in red_channel.c functions which are missing it

2013-07-07 Thread Uri Lublin
On 07/05/2013 03:45 PM, David Gibson wrote: On Fri, Jul 05, 2013 at 08:35:21AM -0400, Yonit Halperin wrote: Ack. Thanks! We have recently associated this problem with some opened bugs we have. I believe Uri is working on a patch for a similar fix to the red_pipes.* routines in red_worker. https

Re: [Spice-devel] [PATCH] Use RING_FOREACH_SAFE in red_channel.c functions which are missing it

2013-07-05 Thread David Gibson
On Fri, Jul 05, 2013 at 08:35:21AM -0400, Yonit Halperin wrote: > Ack. Thanks! We have recently associated this problem with some > opened bugs we have. I believe Uri is working on a patch for a > similar fix to the red_pipes.* routines in red_worker. https://bugzilla.redhat.com/show_bug.cgi?id=88

Re: [Spice-devel] [PATCH] Use RING_FOREACH_SAFE in red_channel.c functions which are missing it

2013-07-05 Thread Hans de Goede
Hi, On 07/05/2013 09:11 AM, David Gibson wrote: Currently, both red_channel_pipes_add_type() and red_channel_pipes_add_empty_msg() use plaing RING_FOREACH() which is not safe versus removals from the ring within the loop body. Thanks for the patch, applied and pushed. Regards, Hans _

Re: [Spice-devel] [PATCH] Use RING_FOREACH_SAFE in red_channel.c functions which are missing it

2013-07-05 Thread Yonit Halperin
Ack. Thanks! We have recently associated this problem with some opened bugs we have. I believe Uri is working on a patch for a similar fix to the red_pipes.* routines in red_worker. On 07/05/2013 03:11 AM, David Gibson wrote: Currently, both red_channel_pipes_add_type() and red_channel_pipes_

Re: [Spice-devel] [PATCH] Use RING_FOREACH_SAFE in red_channel.c functions which are missing it

2013-07-05 Thread Christophe Fergeau
On Fri, Jul 05, 2013 at 05:11:46PM +1000, David Gibson wrote: > Currently, both red_channel_pipes_add_type() and > red_channel_pipes_add_empty_msg() use plaing RING_FOREACH() which is not > safe versus removals from the ring within the loop body. > > Although it's rare, such a removal can occur in

[Spice-devel] [PATCH] Use RING_FOREACH_SAFE in red_channel.c functions which are missing it

2013-07-05 Thread David Gibson
Currently, both red_channel_pipes_add_type() and red_channel_pipes_add_empty_msg() use plaing RING_FOREACH() which is not safe versus removals from the ring within the loop body. Although it's rare, such a removal can occur in both cases. In the case of red_channel_pipes_add_type() we have: r