Re: [PATCH 1/1] tty: release_one_tty() forgets to put pids
From: Oleg Nesterov
Date: Fri Apr 02 2010 - 14:50:20 EST
On 04/02, Eric W. Biederman wrote:
> My general paranoia would suggest setting the pids to NULL. So that
> we don't have the chance of a use after free.
In this case, I don't think this is needed. We are doing
free_tty_struct()->kfree(tty) right after put_pid()s, nobody
can use these pointers or we have another bug.
Most probably this patch is correct (but perhaps it is not the best fix).
Every time tty does put_pid() it should also clear the pointer. But I am
not sure I grepped enough.
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/