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

Uri Lublin uril at redhat.com
Sun Jul 7 03:45:00 PDT 2013


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://bugzilla.redhat.com/show_bug.cgi?id=887775 for example?
>

This is exactly the bug I was looking into.

I have a patch-set replacing some FOREACH macros to SAFE.
In addition to red_channel, some changes are needed in red_worker too.
I'll send patches soon.

Since the cost of using SAFE macros is insignificant (a local
pointer variable and one more assignment per iteration), maybe
it's better to always use SAFE macros.


Thanks,
     Uri.


More information about the Spice-devel mailing list