Re: heavy handed exit() in latest BK

From: Ingo Molnar (
Date: Sun Feb 09 2003 - 06:40:32 EST


there are two bugs in the signal code still:

 - a read_lock(&tasklist_lock) is missing around the group_send_sig_info()
   in send_sig_info().

 - session-IDs and group-IDs are set outside the tasklist lock. This
   causes breakage in the USB code. The correct fix is to do this:

void __set_special_pids(pid_t session, pid_t pgrp)
        struct task_struct *curr = current;

        if (curr->session != session) {
                detach_pid(curr, PIDTYPE_SID);
                curr->session = session;
                attach_pid(curr, PIDTYPE_SID, session);
        if (curr->pgrp != pgrp) {
                detach_pid(curr, PIDTYPE_PGID);
                curr->pgrp = pgrp;
                attach_pid(curr, PIDTYPE_PGID, pgrp);

void set_special_pids(pid_t session, pid_t pgrp)
        __set_special_pids(session, pgrp);

and then update all places that do:

- current->session = 1;
- current->pgrp = 1;


+ set_special_pids(1, 1);

otherwise we change the PIDs without properly rehashing them.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:21 EST