Re: [PATCH 5/7][v8] zap_pid_ns_process() should use force_sig()

From: Oleg Nesterov
Date: Thu Feb 19 2009 - 14:05:10 EST


On 02/18, Sukadev Bhattiprolu wrote:
>
> read_lock(&tasklist_lock);
> nr = next_pidmap(pid_ns, 1);
> while (nr > 0) {
> - kill_proc_info(SIGKILL, SEND_SIG_PRIV, nr);
> + rcu_read_lock();
> +
> + /*
> + * Use force_sig() since it clears SIGNAL_UNKILLABLE ensuring
> + * any nested-container's init processes don't ignore the
> + * signal
> + */
> + task = pid_task(find_vpid(nr), PIDTYPE_PID);
> + force_sig(SIGKILL, task);

Shouldn't we check task != NULL ?

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/