Skip to content

Commit 33ba21e

Browse files
committed
drm/log: Do not hold lock across drm_client_release()
When calling drm_client_release(), the client is already quiescent. Internal locks should therefore be dropped before the caller releases the client. In the case of the DRM log, concurrency originates from the console or from client events. The console has been unregistered in the previous line. The caller of the unregister callback, drm_log_client_unregister(), holds clientlist_mutex from struct drm_device to protect against concurrent client events. It is therefore safe to release the client without holding locks. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>> Link: https://lore.kernel.org/r/20251009132006.45834-3-tzimmermann@suse.de
1 parent a16f6ba commit 33ba21e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/clients/drm_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ static void drm_log_client_unregister(struct drm_client_dev *client)
302302

303303
mutex_lock(&dlog->lock);
304304
drm_log_free_scanout(client);
305-
drm_client_release(client);
306305
mutex_unlock(&dlog->lock);
306+
drm_client_release(client);
307307
kfree(dlog);
308308
drm_dbg(dev, "Unregistered with drm log\n");
309309
}

0 commit comments

Comments
 (0)