Since task_struct->comm can be modified by other threads while the current
thread is reading it, it is recommended to use get_task_comm() for reading
it.
However, since get_task_comm() holds task_struct->alloc_lock spinlock,
some users cannot use get_task_comm(). Also, a lot of users are directly
reading from task_struct->comm even if they can use get_task_comm(). Such
users might obtain inconsistent result.
This patch introduces %pT format specifier for printing task_struct->comm.
Currently %pT does not provide consistency. I'm planning to change to
use RCU in the future. By using RCU, the comm name read from
task_struct->comm will be guaranteed to be consistent. But before
modifying set_task_comm() to use RCU, we need to kill direct ->comm users
who do not use get_task_comm().
An example for converting direct ->comm users is shown below. Since many
debug printings use p == current, you can pass NULL instead of p if p ==
current.