Re: CLONE_KILLVMCH flag proposal

Manfred Spraul (manfreds@colorfullife.com)
Tue, 15 Feb 2000 18:28:22 +0100


From: "Pavel Krauz" <xkr@nettest.dk>
> + read_lock_irq(&tasklist_lock);
> + for (p = current->p_cptr; p; p = p->p_osptr) {
> + if (current->mm == p->mm) {
> + pid = p->pid;
> + read_unlock_irq(&tasklist_lock);
> + kill_proc(pid, SIGKILL, 1);
> + read_lock_irq(&tasklist_lock);
> + }
> + }
> + read_unlock_irq(&tasklist_lock);

"p->mm" is unreliable: theoritically, a thread could be in temporary lazy
tlb mode (start_lazy_tlb() in kernel/exit.c), then p->mm will be NULL. AFAIK
this feature is not yet used.

--
    Manfred

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