weston/libweston
Michael Olbrich 39796f88e6 libweston: clear parent_view when the parent view is destroyed
When a view is destroyed then the views of subsurfaces remain until the view
list is rebuilt for the next repaint.
During that time view->parent_view contains an invalid pointer and weston will
crash when it tries to access the view.

This happens for a surface with subsurfaces with views on two different outputs
with the ivi-shell:

When the surface is destroyed then the destroy handler of the ivi-shell
(shell_handle_surface_destroy()) may be called first. It will (indirectly)
destroy the view of the main surface with weston_view_destroy().
Next the surface destroy handler of the subsurfaces
(subsurface_handle_parent_destroy() is called. It will unmap the first view of
the subsurface. Here weston_surface_assign_output() is called which tries to
find the output of the second view and accesses the now invalid
view->parent_view in the process.

There are probably other ways to trigger similar crashes.

To avoid this, clear view->parent_view when the parent view is destroyed.

Fixes 0669d4de4f ("libweston: Skip views without a layer assignment in
      output_mask calculations")

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2023-02-16 14:56:10 +01:00
..
backend-drm backend-drm: Do not overwrite plane's index when creating virtual plane 2023-02-07 16:24:07 +02:00
backend-headless gl-renderer: use pixel_format_info instead of drm fourccs 2023-01-29 14:47:03 +01:00
backend-rdp backend: Make input notification functions use weston_coord 2023-02-09 12:12:40 +00:00
backend-vnc backend: Make input notification functions use weston_coord 2023-02-09 12:12:40 +00:00
backend-wayland backend-wayland: reuse backend->formats[0] as pixman/cairo/shm pixel format 2023-02-16 09:48:55 +00:00
backend-x11 input: Convert weston_pointer_motion_event to weston_coord 2023-02-09 12:12:40 +00:00
color-lcms color-lcms: add support for matrices 2022-09-28 10:28:28 +00:00
desktop libweston/desktop: committed when transiting from valid to invalid buffer 2023-02-02 11:05:19 +02:00
renderer-gl clipping: Use struct weston_coord in vertex clipping code 2023-02-09 12:12:40 +00:00
shell-utils doc/sphinx: Include weston-config and shell-utils in docs 2023-01-09 22:13:07 +00:00
animation.c Fix indentation all through the project 2021-07-31 15:28:20 +00:00
auth.c libweston: Add user authentication support via PAM 2022-11-23 16:58:48 +01:00
backend.h backend: Make input notification functions use weston_coord 2023-02-09 12:12:40 +00:00
bindings.c Don't send compositor's global key bindings to the input method 2022-02-23 15:40:33 +02:00
clipboard.c libweston: correct argument name in the handler of wl_data_source.accept 2022-04-14 12:05:57 +00:00
color-noop.c libweston: add HDR metadata to weston_output 2022-05-27 10:30:35 +00:00
color.c backend-drm: check for HDR_OUTPUT_METADATA 2022-05-02 12:19:24 +00:00
color.h gl-renderer: add matrix 2022-09-28 10:28:28 +00:00
compositor.c libweston: clear parent_view when the parent view is destroyed 2023-02-16 14:56:10 +01:00
content-protection.c content-protection: Don't leak update timer on shutdown 2021-12-08 13:38:18 +00:00
data-device.c libweston: Use weston_coord space conversion functions 2023-02-01 07:27:05 -06:00
dbus.c dbus: Don't return value from void function 2019-06-11 11:31:04 +01:00
dbus.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
drm-formats.c drm-formats: add weston_drm_format_array_count_pairs() 2021-11-25 10:47:45 -03:00
git-version.h.meson Add Meson build system 2018-12-09 14:50:54 +02:00
gl-borders.c libweston, backends: move GL renderer interface into weston_renderer 2023-01-16 20:40:34 +01:00
gl-borders.h libweston, backends: move GL renderer interface into weston_renderer 2023-01-16 20:40:34 +01:00
input.c input: Use weston_coord in add_border 2023-02-09 12:12:40 +00:00
launcher-impl.h launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
launcher-libseat.c libweston: Enable logging for libseat launcher 2022-03-10 17:13:16 +02:00
launcher-logind.c libweston, backends: pass backend parameter to weston_backend functions 2023-01-13 18:55:59 +01:00
launcher-util.c launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
launcher-util.h launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
libinput-device.c input: Convert weston_pointer_motion_event to weston_coord 2023-02-09 12:12:40 +00:00
libinput-device.h compositor: Use paced logger for unknown scroll source 2022-11-08 08:32:26 -06:00
libinput-seat.c libinput-seat: Cascade errors and bail out in case of failure 2021-11-25 10:47:04 +02:00
libinput-seat.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libweston-internal.h drm-backend: Cache paint node transform 2023-02-02 12:25:54 -06:00
linux-dmabuf.c helpers: Add a u64 from 2 u32 helper 2022-10-27 08:13:30 +00:00
linux-dmabuf.h linux-dmabuf: add missing includes and declarations 2022-12-16 15:05:10 +02:00
linux-explicit-synchronization.c libweston: Advertise minor version 2 of zwp_linux_explicit_synchronization_v1 2019-08-02 15:00:08 +00:00
linux-explicit-synchronization.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
linux-sync-file-uapi.h libweston: Introduce an internal linux sync file API 2019-02-06 12:21:56 +00:00
linux-sync-file.c libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
linux-sync-file.h libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
log.c libweston: Add weston_log_paced() 2022-11-08 08:32:26 -06:00
meson.build libweston: Add support for tearing-control 2023-02-01 10:12:55 -06:00
noop-renderer.c pixman-renderer: set renderbuffer via new repaint_output parameter 2023-01-23 20:05:21 +00:00
output-capture.c Revert "libweston: let weston_output_update_capture_info() take drm_format" 2023-01-28 12:59:16 +00:00
output-capture.h Revert "libweston: let weston_output_update_capture_info() take drm_format" 2023-01-28 12:59:16 +00:00
pixel-formats.c pixel-formats: add pixel_format_get_array() 2023-01-29 14:47:03 +01:00
pixel-formats.h pixel-formats: add pixel_format_get_array() 2023-01-29 14:47:03 +01:00
pixman-renderer.c libweston: Use weston_coord space conversion functions 2023-02-01 07:27:05 -06:00
pixman-renderer.h pixman-renderer: use pixel_format_info instead of pixman_format_code_t 2023-01-28 12:59:16 +00:00
plugin-registry.c Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
screenshooter.c screenshooter: Add SHM buffer destroy listener to avoid invalid memcpy 2022-10-03 16:52:16 +02:00
spring-tool.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
timeline.c libweston: fix typos 2021-02-24 10:01:17 -05:00
timeline.h libweston: move TYPEVERIFY macro into shared 2021-02-17 12:52:33 +00:00
touch-calibration.c libweston: Use weston_coord space conversion functions 2023-02-01 07:27:05 -06:00
vertex-clipping.c clipping: Use struct weston_coord in vertex clipping code 2023-02-09 12:12:40 +00:00
vertex-clipping.h clipping: Use struct weston_coord in vertex clipping code 2023-02-09 12:12:40 +00:00
weston-direct-display.c libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
weston-log-file.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-flight-rec.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-internal.h weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log-wayland.c Fix indentation all through the project 2021-07-31 15:28:20 +00:00
weston-log.c weston-log: Fix documentation for weston_log_subscription_create 2022-07-01 17:20:18 +03:00