Re: [PATCH v2 1/3] drm: use the lookup lock in drm_is_current_master

2021-07-27 Thread Daniel Vetter
On Sat, Jul 24, 2021 at 07:18:22PM +0800, Desmond Cheong Zhi Xi wrote: > Inside drm_is_current_master, using the outer drm_device.master_mutex > to protect reads of drm_file.master makes the function prone to creating > lock hierarchy inversions. Instead, we can use the > drm_file.master_lookup_loc

[PATCH v2 1/3] drm: use the lookup lock in drm_is_current_master

2021-07-24 Thread Desmond Cheong Zhi Xi
Inside drm_is_current_master, using the outer drm_device.master_mutex to protect reads of drm_file.master makes the function prone to creating lock hierarchy inversions. Instead, we can use the drm_file.master_lookup_lock that sits at the bottom of the lock hierarchy. Reported-by: Daniel Vetter S