drm/vmwgfx: Fix a layout race condition
This fixes a layout update race condition. We make sure the crtc mutex is locked before we dereference crtc->state. Otherwise the state might change under us. Since now we're already holding the crtc mutexes when reading the gui coordinates, protect them with the crtc mutexes rather than with the requested_layout mutex. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Deepak Rawat <drawat@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
This commit is contained in:
@@ -465,15 +465,6 @@ struct vmw_private {
|
||||
|
||||
uint32_t num_displays;
|
||||
|
||||
/*
|
||||
* Currently requested_layout_mutex is used to protect the gui
|
||||
* positionig state in display unit. With that use case currently this
|
||||
* mutex is only taken during layout ioctl and atomic check_modeset.
|
||||
* Other display unit state can be protected with this mutex but that
|
||||
* needs careful consideration.
|
||||
*/
|
||||
struct mutex requested_layout_mutex;
|
||||
|
||||
/*
|
||||
* Framebuffer info.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user