Re: Subject: Re: NULL pointer in proc_pid_stat -- oops.

From: OGAWA Hirofumi
Date: Mon Mar 29 2004 - 09:20:41 EST

Albert Cahalan <albert@xxxxxxxxxxxx> writes:

> > if (task->tty) {
> > tty_pgrp = task->tty->pgrp;
> > tty_nr = new_encode_dev(tty_devnum(task->tty));
> > }
> >
> > Some place doesn't take the any lock for ->tty.
> > I think we need to take the lock for ->tty.
> Probably this isn't the thing for 2.6.xx,

Ah, sorry for confusing. This is 2.6.x (maybe also 2.4.x).

e.g. the above take the task_lock(). But disassociate_ctty() just take
read_lock(&tasklist_lock), etc. etc. So looks like racy.
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at