Can you please introduce kill_pidns_info and have both
kill_something_info and zap_pid_ns_processes call this common
function?
We want to walk the set of all pids in a pid namespace. /proc does
this and it is the recommended idiom. If walking all of the pids in a
pid namespace is not fast enough we can accelerate that.
You are correct signalling every thread in a namespace is worse, in
fact it is semantically incorrect. zap_pid_ns_processes gets away
with it because it is sending SIGKILL. Therefore kill_pidns_info
should skip sending a signal to every task that is not the
thread_group_leader.
We need to hold the tasklist_lock to prevent new processes from
joining the list of all processes. Otherwise we could run the code
under the rcu_read_lock.
Eric
--