@@ -406,11 +406,20 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
seq_putc(m, '\n');
list_for_each_entry_reverse(file, &dev->filelist, lhead) {
struct file_stats stats;
+ struct task_struct *task;
+ char name[TASK_COMM_LEN];
memset(&stats, 0, sizeof(stats));
idr_for_each(&file->object_idr, per_file_stats, &stats);
+ task = get_pid_task(file->pid, PIDTYPE_PID);
+ if (task) {
+ get_task_comm(name, task);
+ put_task_struct(task);
+ } else {
+ strlcpy(name, "<unknown>", sizeof(name));
+ }
seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu unbound)\n",
- get_pid_task(file->pid, PIDTYPE_PID)->comm,
+ name,
stats.count,
stats.total,
stats.active,