Re: [PATCH spice] Fix dcc_start() regression

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

 



> 
> Commit e9ed125d introduced a dead-lock regression by taking twice the
> same lock recursively. The previous code checked if a dmabuf was set
> without taking the lock, for queuing scanout messages. Since the message
> is being processed later on, it make sense to queue and delay until it
> is sent to check if there is a scanout.
> 

Acked.

Frediano


> backtrace:
>  #0  red_qxl_get_gl_scanout (qxl_state=0x5555582373c0) at red-qxl.c:828
>  #1  0x00007fffec1ae654 in marshall_gl_scanout (rcc=0x7fffda6a7010,
>  #m=0x7fff44025e60, item=0x7fff440958a0) at dcc-send.c:2310
>  #2  0x00007fffec1aec7b in dcc_send_item (dcc=0x7fffda6a7010,
>  #pipe_item=0x7fff440958a0) at dcc-send.c:2441
>  #3  0x00007fffec1730f6 in send_item (rcc=0x7fffda6a7010,
>  #item=0x7fff440958a0) at display-channel.c:1963
>  #4  0x00007fffec1504c3 in
>  #red_channel_client_send_item (rcc=0x7fffda6a7010, item=0x7fff440958a0)
>  #at red-channel.c:578
>  #5  0x00007fffec152d98 in red_channel_client_push (rcc=0x7fffda6a7010)
>  #at red-channel.c:1365
>  #6  0x00007fffec1a387e in dcc_push_monitors_config (dcc=0x7fffda6a7010)
>  #at dcc.c:563
>  #7  0x00007fffec1a3489 in dcc_start (dcc=0x7fffda6a7010) at dcc.c:475
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> ---
>  server/dcc.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index 70a9b99..1f71423 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -446,7 +446,6 @@ void dcc_start(DisplayChannelClient *dcc)
>  {
>      DisplayChannel *display = DCC_TO_DC(dcc);
>      RedChannelClient *rcc = RED_CHANNEL_CLIENT(dcc);
> -    QXLInstance *qxl = display->common.qxl;
>  
>      red_channel_client_push_set_ack(RED_CHANNEL_CLIENT(dcc));
>  
> @@ -467,17 +466,11 @@ void dcc_start(DisplayChannelClient *dcc)
>          dcc_create_all_streams(dcc);
>      }
>  
> -    SpiceMsgDisplayGlScanoutUnix *scanout = red_qxl_get_gl_scanout(qxl->st);
> -    if (scanout) {
> -        if (reds_stream_is_plain_unix(rcc->stream) &&
> -            red_channel_client_test_remote_cap(rcc,
> SPICE_DISPLAY_CAP_GL_SCANOUT)) {
> -            red_channel_client_pipe_add(rcc, dcc_gl_scanout_item_new(rcc,
> NULL, 0));
> -            dcc_push_monitors_config(dcc);
> -        } else {
> -            spice_printerr("FIXME: GL not supported on this kind of
> connection");
> -        }
> +    if (reds_stream_is_plain_unix(rcc->stream) &&
> +        red_channel_client_test_remote_cap(rcc,
> SPICE_DISPLAY_CAP_GL_SCANOUT)) {
> +        red_channel_client_pipe_add(rcc, dcc_gl_scanout_item_new(rcc, NULL,
> 0));
> +        dcc_push_monitors_config(dcc);
>      }
> -    red_qxl_put_gl_scanout(qxl->st, scanout);
>  }
>  
>  static void dcc_destroy_stream_agents(DisplayChannelClient *dcc)
> --
> 2.5.0
> 
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]