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

Vasiliy Kulikov
2011-07-21T12:50:59Z

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@openwall.com>

Thanks,

--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments