[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100402184823.GB32229@redhat.com>
Date: Fri, 2 Apr 2010 20:48:23 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...ux.intel.com>, Greg KH <greg@...ah.com>,
Catalin Marinas <catalin.marinas@....com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Serge Hallyn <serue@...ibm.com>,
Sukadev Bhattiprolu <sukadev@...ibm.com>, stable@...nel.org
Subject: Re: [PATCH 1/1] tty: release_one_tty() forgets to put pids
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.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists