mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
drm: Track clients by tgid and not tid
Thread group id (aka pid from userspace point of view) is a more interesting thing to show as an owner of a DRM fd, so track and show that instead of the thread id. In the next patch we will make the owner updated post file descriptor handover, which will also be tgid based to avoid ping-pong when multiple threads access the fd. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230314141904.1210824-2-tvrtko.ursulin@linux.intel.com
This commit is contained in:
committed by
Christian König
parent
e2945e6c51
commit
4230cea89c
@@ -80,7 +80,7 @@ static int drm_clients_info(struct seq_file *m, void *data)
|
||||
seq_printf(m,
|
||||
"%20s %5s %3s master a %5s %10s\n",
|
||||
"command",
|
||||
"pid",
|
||||
"tgid",
|
||||
"dev",
|
||||
"uid",
|
||||
"magic");
|
||||
@@ -94,7 +94,7 @@ static int drm_clients_info(struct seq_file *m, void *data)
|
||||
bool is_current_master = drm_is_current_master(priv);
|
||||
|
||||
rcu_read_lock(); /* locks pid_task()->comm */
|
||||
task = pid_task(priv->pid, PIDTYPE_PID);
|
||||
task = pid_task(priv->pid, PIDTYPE_TGID);
|
||||
uid = task ? __task_cred(task)->euid : GLOBAL_ROOT_UID;
|
||||
seq_printf(m, "%20s %5d %3d %c %c %5d %10u\n",
|
||||
task ? task->comm : "<unknown>",
|
||||
|
||||
Reference in New Issue
Block a user