diff options
author | Zack Rusin <[email protected]> | 2024-08-16 14:32:05 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2024-08-26 00:19:40 -0400 |
commit | aba07b9a0587f50e5d3346eaa19019cf3f86c0ea (patch) | |
tree | b40756c01fc30a00746e30ab5ee6324b5a280a07 /scripts/gcc-plugins/randomize_layout_plugin.c | |
parent | c358a809cb58af944d496944391a240e02f5837a (diff) |
drm/vmwgfx: Prevent unmapping active read buffers
The kms paths keep a persistent map active to read and compare the cursor
buffer. These maps can race with each other in simple scenario where:
a) buffer "a" mapped for update
b) buffer "a" mapped for compare
c) do the compare
d) unmap "a" for compare
e) update the cursor
f) unmap "a" for update
At step "e" the buffer has been unmapped and the read contents is bogus.
Prevent unmapping of active read buffers by simply keeping a count of
how many paths have currently active maps and unmap only when the count
reaches 0.
Fixes: 485d98d472d5 ("drm/vmwgfx: Add support for CursorMob and CursorBypass 4")
Cc: Broadcom internal kernel review list <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v5.19+
Signed-off-by: Zack Rusin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Martin Krastev <[email protected]>
Reviewed-by: Maaz Mombasawala <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions