[PATCH 1/3] compositor: Remove a plane from the compositor list when releasing it

Kristian Høgsberg hoegsberg at gmail.com
Fri Jul 5 13:51:17 PDT 2013


On Fri, Jul 05, 2013 at 04:05:26PM +0300, Ander Conselvan de Oliveira wrote:
> From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> 
> Weston would crash when hot plugging/unplugging outputs using the DRM
> backend due to a corrupted plane list.

Hey Ander, thanks for fixing these.  All patches look good and the
new weston.ini behavior in 2/3 makes more sense than what we do now.

Kristian

> https://bugs.freedesktop.org/show_bug.cgi?id=66530
> https://bugs.freedesktop.org/show_bug.cgi?id=66529
> ---
>  src/compositor.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index 8e74dbc..5196b17 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -2498,6 +2498,10 @@ weston_plane_init(struct weston_plane *plane, int32_t x, int32_t y)
>  	pixman_region32_init(&plane->clip);
>  	plane->x = x;
>  	plane->y = y;
> +
> +	/* Init the link so that the call to wl_list_remove() when releasing
> +	 * the plane without ever stacking doesn't lead to a crash */
> +	wl_list_init(&plane->link);
>  }
>  
>  WL_EXPORT void
> @@ -2505,6 +2509,8 @@ weston_plane_release(struct weston_plane *plane)
>  {
>  	pixman_region32_fini(&plane->damage);
>  	pixman_region32_fini(&plane->clip);
> +
> +	wl_list_remove(&plane->link);
>  }
>  
>  WL_EXPORT void
> -- 
> 1.7.9.5
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list