[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+55aFx4Se0+ff4gnrY5_bVYH9BpeMsZ1=aKgZ5bmw8QC4sajw@mail.gmail.com>
Date: Wed, 5 Feb 2014 08:52:43 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Eric Paris <eparis@...isplace.org>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Smith <dsmith@...hat.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Igor Zhbanov <i.zhbanov@...sung.com>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [RFC][PATCH] exec: Fix use after free of tracepoint trace_sched_process_exec
On Wed, Feb 5, 2014 at 5:52 AM, Oleg Nesterov <oleg@...hat.com> wrote:
>
> Do we really need this change? If not (afaics), the patch can be
> much simpler, see below...
Right you are.
I started out with free_bprm() being non-static, and thought I had to
handle other callers. Which is why I made the bprm->filename be the
"struct filename" so that brpm_free() could free it.
And then I only later noticed that free_bprm() was really only used by
fs/exec.c, and turned it static - and you're right, if we always just
free it in do_execve_common(), that simplifies the patch a lot.
Good call. New patch attached. More comments?
Linus
View attachment "patch.diff" of type "text/plain" (9080 bytes)
Powered by blists - more mailing lists