it might make some marginal sense to get an oops message out when
there's stack overflow/corruption that damages task->comm. I've seen a
good number of traces that printed out task->comm as an overlength
string - which obscured other, possibly more important info that could
have been printed until the system became so hosed that it would not
print anything.
but ... this is really splitting hairs and even when the stack and hence
the task struct is corrupted, an accidental NIL character is almost
always a certainty. I remember only a single case in the past ~10 years
where an oops would print a "never ending" p->comm because the
corruption was a runaway memset to a non-0 value.
so printing it as %s should be perfectly fine too, for all practical
purposes. (and printing it _without_ the TASK_COMM_LEN complication
might help get out information faster in some other crash situations -
so the argument can be made in the opposite direction too.)
Ingo
-