[lkml]   [2003]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: heavy handed exit() in latest BK


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

 \ /
  Last update: 2005-03-22 13:33    [W:0.048 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site