mirror-linux/drivers/gpu/drm/vmwgfx
Zack Rusin a309c7194e drm/vmwgfx: Remove rcu locks from user resources
User resource lookups used rcu to avoid two extra atomics. Unfortunately
the rcu paths were buggy and it was easy to make the driver crash by
submitting command buffers from two different threads. Because the
lookups never show up in performance profiles replace them with a
regular spin lock which fixes the races in accesses to those shared
resources.

Fixes kernel oops'es in IGT's vmwgfx execution_buffer stress test and
seen crashes with apps using shared resources.

Fixes: e14c02e6b6 ("drm/vmwgfx: Look up objects without taking a reference")
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Maaz Mombasawala <mombasawalam@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221207172907.959037-1-zack@kde.org
2023-01-09 21:15:36 -05:00
..
device_include
Kconfig drm/vmwgfx: Port the framebuffer code to drm fb helpers 2022-10-25 12:42:27 -04:00
Makefile drm/vmwgfx: Port the framebuffer code to drm fb helpers 2022-10-25 12:42:27 -04:00
ttm_object.c drm/vmwgfx: Remove rcu locks from user resources 2023-01-09 21:15:36 -05:00
ttm_object.h drm/vmwgfx: Remove rcu locks from user resources 2023-01-09 21:15:36 -05:00
vmw_surface_cache.h
vmwgfx_binding.c
vmwgfx_binding.h
vmwgfx_blit.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
vmwgfx_bo.c drm/vmwgfx: Remove rcu locks from user resources 2023-01-09 21:15:36 -05:00
vmwgfx_cmd.c
vmwgfx_cmdbuf.c
vmwgfx_cmdbuf_res.c drm/vmwgfx: Remove vmwgfx_hashtab 2022-10-25 12:42:25 -04:00
vmwgfx_context.c
vmwgfx_cotable.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
vmwgfx_devcaps.c
vmwgfx_devcaps.h
vmwgfx_drv.c drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
vmwgfx_drv.h drm/vmwgfx: Remove rcu locks from user resources 2023-01-09 21:15:36 -05:00
vmwgfx_execbuf.c drm/vmwgfx: Remove rcu locks from user resources 2023-01-09 21:15:36 -05:00
vmwgfx_fence.c
vmwgfx_fence.h
vmwgfx_gem.c
vmwgfx_gmr.c
vmwgfx_gmrid_manager.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
vmwgfx_ioctl.c
vmwgfx_irq.c
vmwgfx_kms.c drm/vmwgfx: Cleanup the cursor snooping code 2022-10-31 11:50:24 -04:00
vmwgfx_kms.h drm/vmwgfx: Port the framebuffer code to drm fb helpers 2022-10-25 12:42:27 -04:00
vmwgfx_ldu.c drm/vmwgfx: Remove explicit and broken vblank handling 2022-10-25 12:42:29 -04:00
vmwgfx_mksstat.h drm/vmwgfx: Add a mksstat counter for cotable resizes 2022-10-25 12:42:30 -04:00
vmwgfx_mob.c
vmwgfx_msg.c drm for 6.2: 2022-12-13 11:59:58 -08:00
vmwgfx_msg_arm64.h
vmwgfx_msg_x86.h
vmwgfx_overlay.c
vmwgfx_page_dirty.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
vmwgfx_prime.c
vmwgfx_reg.h
vmwgfx_resource.c drm/vmwgfx: Remove rcu locks from user resources 2023-01-09 21:15:36 -05:00
vmwgfx_resource_priv.h
vmwgfx_scrn.c drm for 6.2: 2022-12-13 11:59:58 -08:00
vmwgfx_shader.c
vmwgfx_simple_resource.c
vmwgfx_so.c
vmwgfx_so.h
vmwgfx_stdu.c drm/vmwgfx: Remove explicit and broken vblank handling 2022-10-25 12:42:29 -04:00
vmwgfx_streamoutput.c
vmwgfx_surface.c drm/vmwgfx: Cleanup the cursor snooping code 2022-10-31 11:50:24 -04:00
vmwgfx_system_manager.c
vmwgfx_ttm_buffer.c
vmwgfx_ttm_glue.c
vmwgfx_va.c
vmwgfx_validation.c drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation. 2022-10-25 12:42:20 -04:00
vmwgfx_validation.h drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation. 2022-10-25 12:42:20 -04:00