Re: [Spice-devel] [spice-gtk 1/2] gst: Chain up dispose impl to parent class

2013-07-08 Thread Marc-André Lureau
ack series - Mensaje original - > --- > gtk/spice-gstaudio.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c > index 6dd250e..4a80889 100644 > --- a/gtk/spice-gstaudio.c > +++ b/gtk/spice-gstaudio.c > @@ -101,6 +101,9 @@ static void

[Spice-devel] [spice-gtk 2/2] doc: Fix typo in code comment

2013-07-08 Thread Christophe Fergeau
--- gtk/usb-device-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 8a20e9e..0535609 100644 --- a/gtk/usb-device-manager.c +++ b/gtk/usb-device-manager.c @@ -533,7 +533,7 @@ static void spice_usb_device_manager

[Spice-devel] [spice-gtk 1/2] gst: Chain up dispose impl to parent class

2013-07-08 Thread Christophe Fergeau
--- gtk/spice-gstaudio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c index 6dd250e..4a80889 100644 --- a/gtk/spice-gstaudio.c +++ b/gtk/spice-gstaudio.c @@ -101,6 +101,9 @@ static void spice_gstaudio_dispose(GObject *obj) g_object_unr

Re: [Spice-devel] [server PATCH 7/8] red_worker: use a generic SAFE_FOREACH macro

2013-07-08 Thread Uri Lublin
On 07/08/2013 01:57 PM, Christophe Fergeau wrote: On Mon, Jul 08, 2013 at 01:32:29PM +0300, Uri Lublin wrote: Introduce SAFE_FOREACH macro Make other safe iterators use SAFE_FOREACH There's already a RING_FOREACH_SAFE() macro in spice-common/ring.h, could it be useful here? Hi Christophe,

Re: [Spice-devel] [server PATCH 0/8] use a SAFE version of RING_FOREACH (worker/channel)

2013-07-08 Thread Yonit Halperin
Ack Series, with the comment that the actual risky places that cause the crash, may better use safe red_channel.c routines instead. But it can be done later. On 07/08/2013 06:32 AM, Uri Lublin wrote: If in RING_FOREACH (in == somewhere in the callee-tree) there is a call to read or write, it i

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

2013-07-08 Thread Yonit Halperin
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, remov

Re: [Spice-devel] on usbredir function of virtviewer

2013-07-08 Thread Uri Lublin
On 07/01/2013 05:35 AM, letterdove wrote: Dear Mr/Miss, I am experiencing spice-client software virtviewer for sevral months.Here is my idea of it that I found usbredir capcability of the virtviewer is unavailable on Microsoft Windows. I've noticed that the virtviewer developers dedicated to

Re: [Spice-devel] [server PATCH 0/8] use a SAFE version of RING_FOREACH (worker/channel)

2013-07-08 Thread Christophe Fergeau
ACK series Christophe On Mon, Jul 08, 2013 at 01:32:22PM +0300, Uri Lublin wrote: > If in RING_FOREACH (in == somewhere in the callee-tree) there is > a call to read or write, it is not safe, and RING_FOREACH_SAFE > should be used. > > A call to such read/write that fails, may lead > to disconne

Re: [Spice-devel] [server PATCH 6/8] red_worker: make CCC_FOREACH safe

2013-07-08 Thread Christophe Fergeau
On Mon, Jul 08, 2013 at 01:32:28PM +0300, Uri Lublin wrote: > Even though it is not used, it's better to make it safe (or remove it). I'd either remove it, or fold that patch into the next one (ie silently make it safe by switching to SAFE_FOREACH) Christophe > --- > server/red_worker.c | 12

Re: [Spice-devel] [server PATCH 7/8] red_worker: use a generic SAFE_FOREACH macro

2013-07-08 Thread Christophe Fergeau
On Mon, Jul 08, 2013 at 01:32:29PM +0300, Uri Lublin wrote: > Introduce SAFE_FOREACH macro > > Make other safe iterators use SAFE_FOREACH There's already a RING_FOREACH_SAFE() macro in spice-common/ring.h, could it be useful here? Christophe > --- > server/red_worker.c | 64 +

[Spice-devel] [server PATCH 8/8] red_channel: replace RING_FOREACH with RING_FOREACH_SAFE in some places

2013-07-08 Thread Uri Lublin
This was originally intended to fix the problem fixed by commit 53488f0275d6c8a121af49f7ac817d09ce68090d. What is left are FOREACH loops that are at less risk and maybe safe (no read/write or disconnect/destroy are called from within them). --- server/red_channel.c |8 1 files change

[Spice-devel] [server PATCH 7/8] red_worker: use a generic SAFE_FOREACH macro

2013-07-08 Thread Uri Lublin
Introduce SAFE_FOREACH macro Make other safe iterators use SAFE_FOREACH --- server/red_worker.c | 64 ++ 1 files changed, 28 insertions(+), 36 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 1f239c5..7351064 100644 --- a

[Spice-devel] [server PATCH 6/8] red_worker: make CCC_FOREACH safe

2013-07-08 Thread Uri Lublin
Even though it is not used, it's better to make it safe (or remove it). --- server/red_worker.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 72e5ea5..1f239c5 100644 --- a/server/red_worker.c +++ b/server/red_wor

[Spice-devel] [server PATCH 5/8] red_worker: make DRAWABLE_FOREACH_DPI safe

2013-07-08 Thread Uri Lublin
--- server/red_worker.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index ffd278c..72e5ea5 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1139,12 +1139,14 @@ static inline uint64_t red_now(vo

[Spice-devel] [server PATCH 4/8] red_worker: use only DRAWABLE_FOREACH_GLZ_SAFE

2013-07-08 Thread Uri Lublin
--- server/red_worker.c | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 0599a0e..ffd278c 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1146,13 +1146,6 @@ static inline uint64_t red_now(void);

[Spice-devel] [server PATCH 3/8] red_worker: make WORKER_FOREACH_DCC safe

2013-07-08 Thread Uri Lublin
Specifically, the loop in red_pipes_add_draw can cause spice to abort. In red_worker.c (WORKER_FOREACH_DCC): red_pipes_add_drawable red_pipe_add_drawable red_handle_drawable_surfaces_client_synced red_push_surface_image red_channel_client_push red_channel_

[Spice-devel] [server PATCH 2/8] red_worker: reuse DCC_FOREACH in WORKER_DCC_FOREACH

2013-07-08 Thread Uri Lublin
The only thing that is needed is to get the channel out of the worker. --- server/red_worker.c | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index a7f8d79..8503d16 100644 --- a/server/red_worker.c +++ b/server/red_worke

[Spice-devel] [server PATCH 1/8] red_worker: use only RCC_FOREACH_SAFE

2013-07-08 Thread Uri Lublin
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 spic

[Spice-devel] [server PATCH 0/8] use a SAFE version of RING_FOREACH (worker/channel)

2013-07-08 Thread Uri Lublin
If in RING_FOREACH (in == somewhere in the callee-tree) there is a call to read or write, it is not safe, and RING_FOREACH_SAFE should be used. A call to such read/write that fails, may lead to disconnecting from the client, which means cleaning up things, and possibly removing from the ring the s