浏览代码

drm: Print the pid when debug logging an ioctl error.

When we debug print what ioctl we're calling into, we include the pid.
If you have multiple processes rendering simulataneously, the error
return also needs the pid so you can see which of the ioctl calls was
the one to fail.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180130215643.11016-1-eric@anholt.net
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eric Anholt 7 年之前
父节点
当前提交
9c950e468c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/drm_ioctl.c

+ 1 - 1
drivers/gpu/drm/drm_ioctl.c

@@ -848,7 +848,7 @@ long drm_ioctl(struct file *filp,
 	if (kdata != stack_kdata)
 	if (kdata != stack_kdata)
 		kfree(kdata);
 		kfree(kdata);
 	if (retcode)
 	if (retcode)
-		DRM_DEBUG("ret = %d\n", retcode);
+		DRM_DEBUG("pid=%d, ret = %d\n", task_pid_nr(current), retcode);
 	return retcode;
 	return retcode;
 }
 }
 EXPORT_SYMBOL(drm_ioctl);
 EXPORT_SYMBOL(drm_ioctl);