Re: [PATCH 1/2] drm: Add a locked version of drm_is_current_master

2021-06-14 Thread Emil Velikov
On Sat, 12 Jun 2021 at 13:55, Desmond Cheong Zhi Xi wrote: > > While checking the master status of the DRM file in > drm_is_current_master(), the device's master mutex should be > held. Without the mutex, the pointer fpriv->master may be freed > concurrently by another process calling drm_setmaste

[PATCH 1/2] drm: Add a locked version of drm_is_current_master

2021-06-12 Thread Desmond Cheong Zhi Xi
While checking the master status of the DRM file in drm_is_current_master(), the device's master mutex should be held. Without the mutex, the pointer fpriv->master may be freed concurrently by another process calling drm_setmaster_ioctl(). This could lead to use-after-free errors when the pointer i