It is about the list traversal. In the process group case it is about
traversing the pid->tasks[PIDTYPE_PGID] hlist, which is also protected
by the tasklist_lock.
I think it is totally reasonable to add a per pid lock,
that would protect the pid->task[...] hlist. That would make
things clearer and finer grained without a lot of effort. Just
a little more struct pid bloat, and a little extra care in fork,
when we add to those lists.
Even with the per-pgrp lock we still need a lock on the global process
list for the kill -KILL -1 case. Which suggests that tasklist_lock is
still needed for part of kill_something_info.
Eric
--