Re: [PATCH 11/16] signal: prepare for CLD_* notification changes

From: Tejun Heo
Date: Tue Dec 21 2010 - 12:36:03 EST


On Mon, Dec 20, 2010 at 05:21:20PM +0100, Oleg Nesterov wrote:
> > @@ -1640,6 +1684,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
> > }
> >
> > sighand = parent->sighand;
> > + sig = parent->signal;
>
> This looks unneeded.

Yeah, it's unneeded but sighand and sig are used earlier in the
function to point to the respective structures of the child while in
the latter part for the parent. I was afraid a later change to the
parent part might incorrectly use sig not realizing that it's still
pointing to the child->signal, so I think it would be better to keep
the unnecessary chunk for now. Or we can introduce separate variables
for child and parent. Hmmm... yeah, that actually would be better, I
think.

Thanks.

--
tejun
--
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/