Re: [PATCH 26/76] tty: Add a kref count

Alan Cox
2008-10-06T10:52:49Z

On Mon, Oct 06, 2008 at 12:20:37PM +0200, Louis Rilling wrote:
>
> I'm a bit puzzled by this 'tty_kref_put(p->signal->tty)'. AFAICS, this is a noop
> since we are not in the CLONE_THREAD case and hence p->signal->tty == NULL.

When I first did it I was seeing non NULL values, but since then I've added
the initialisation

> So, is it to make the code look more consistent? If so, is it worth adding extra
> code and cycles for this (I doubt that gcc is able to optimize this away)? What
> kind of future changes should this code protect against?

I'll take a look, you may well be right, and if so it can become a WARN_ON()
instead.