问题 I want to get the process name from task_struct , but I get an error dereferencing pointer to incomplete type (task->comm). I have to use pid_task function. I have no idea why it does not work. 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->comm); return len; } 回答1: To find the task_struct of a process we can make use of