Skip to content

drm/vmwgfx: Remove rcu locks from user resources - #802

Open
TrietHoang-DL wants to merge 1 commit into
Freescale:5.15-2.2.x-imxfrom
TrietHoang-DL:CVE-2022-38457/5.15-2.2.x-imx
Open

drm/vmwgfx: Remove rcu locks from user resources#802
TrietHoang-DL wants to merge 1 commit into
Freescale:5.15-2.2.x-imxfrom
TrietHoang-DL:CVE-2022-38457/5.15-2.2.x-imx

Conversation

@TrietHoang-DL

Copy link
Copy Markdown

[ Upstream commit a309c71 ]

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: e14c02e ("drm/vmwgfx: Look up objects without taking a reference")

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

[ Upstream commit a309c71 ]

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: e14c02e ("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
Signed-off-by: Triet Hoang <triet.hoang@datalogic.com>
@TrietHoang-DL TrietHoang-DL changed the title [CVE-2022-38457] drm/vmwgfx: Remove rcu locks from user resources drm/vmwgfx: Remove rcu locks from user resources Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants