Re: [PATCH 2/2] taskstats: add_del_listener() should ignore !validlistener's

From: Vasiliy Kulikov
Date: Thu Jul 21 2011 - 08:51:04 EST


On Wed, Jul 20, 2011 at 23:01 +0200, Oleg Nesterov wrote:
> > it is unknown when it died. As the same pid
> > can be reused by a new process BEFORE add_del_listener(), it is unknown
> > whether ->pid points to the actual owner task.
>
> And? Why should we try to reuse the !valid entries? struct listener
> is just the "addr" we should send the message to. If someone calls
> add_listener() it should works regardless of dead entries with the
> same ->pid.

True.

> > Rather than optimizing the wrong algorithm it's better to change the
> > processes keeping way.
>
> Not sure I understand... This is not optimizing, the patch tries to
> fix the unlikely (in fact mostly theoretical) and minor problem.

Ah, I see the problem here. Yes, then it surely makes sense.

Reviewed-by: Vasiliy Kulikov <segoon@xxxxxxxxxxxx>


Thanks,

--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
--
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/