Re: [server PATCH 1/8] red_worker: use only RCC_FOREACH_SAFE

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

 



On 07/08/2013 06:42 PM, Yonit Halperin wrote:
Hi,

On 07/08/2013 06:32 AM, Uri Lublin wrote:
RCC_FOREACH may be dangerous

The following patches replace FOREACH loops with a SAFE version.
Using unsafe loops may cause spice-server to abort (assert fails).
Specifically a read/write fail in those loops, may cause the client
to disconnect, removing the node currently iterated, which cause spice
to abort in ring_next():
  -- assertion `pos->next != NULL && pos->prev != NULL' failed
Now that red_channel was fixed to use RING_FOREACH_SAFE where needed, I think it would be nicer to reuse red_channel.c code, specifically, red_channel_pipes_new_add.

Hi Yonit,

Thanks for the review.

It's possible to reuse red_channel.c code.
I'm not sure it would make the code more readable with the
callbacks, but possibly easier to debug.

Thanks,
    Uri.

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]