title: How to get process name from PID using C
body: <p>I want to get the process name from <code>task_struct</code>, but
  I get an error dereferencing pointer to incomplete type (task->comm).
  I have to use <code>pid_task</code> function.
  I have no idea why it does not work. </p>
  
  <pre><code>ssize_t simple_read(struct file *filp, char __user *user_buf, size_t count, loff_t *f_pos) {
  
      int len=0;
      pid_struct = find_get_pid(pid);
      task = pid_task(pid_struct,PIDTYPE_PID);
  
      len = sprintf(user_buf,"\nname %s\n ",task-&gt;comm);
      return len;
  }
  </code></pre>