Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-05 Thread Gerd Hoffmann
Hi, Hi, RED_WORKER_MESSAGE_DISPLAY_DISCONNECT is not the only place that triggers red_disconnect_channel (and as a result, reds_stream_free(dispatcher-stream)). red_disconnect_channel is called also when there is an error upon receive/send and also when timeouts related to the client occur

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-05 Thread Alon Levy
On Mon, Sep 05, 2011 at 11:02:43AM +0200, Gerd Hoffmann wrote: Hi, Hi, RED_WORKER_MESSAGE_DISPLAY_DISCONNECT is not the only place that triggers red_disconnect_channel (and as a result, reds_stream_free(dispatcher-stream)). red_disconnect_channel is called also when there is an error

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-05 Thread Gerd Hoffmann
Hi, I verified it still calls reds_stream_free from the worker thread, only now the call itself is done in red_channel.c (via red_channel_disconnect or something like that), which is called from red_worker.c Where the code in red_channel.c is now shared for all channel types? Hmm. That

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-05 Thread Alon Levy
On Mon, Sep 05, 2011 at 03:29:39PM +0200, Gerd Hoffmann wrote: Hi, I verified it still calls reds_stream_free from the worker thread, only now the call itself is done in red_channel.c (via red_channel_disconnect or something like that), which is called from red_worker.c Where the code

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-05 Thread Alon Levy
On Mon, Sep 05, 2011 at 03:29:39PM +0200, Gerd Hoffmann wrote: Hi, I verified it still calls reds_stream_free from the worker thread, only now the call itself is done in red_channel.c (via red_channel_disconnect or something like that), which is called from red_worker.c Where the code

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-04 Thread Yonit Halperin
On 09/02/2011 06:19 PM, Gerd Hoffmann wrote: reds_stream_free() may call the channel_event callback which is not supposed to be callsed from worker thread context. This patch moves the reds_stream_free call for the display channel from the worker to the dispatcher to fix this issue. [ Note:

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-02 Thread Alon Levy
On Fri, Sep 02, 2011 at 05:19:54PM +0200, Gerd Hoffmann wrote: reds_stream_free() may call the channel_event callback which is not supposed to be callsed from worker thread context. This patch moves the reds_stream_free call for the display channel from the worker to the dispatcher to fix