On Thu, 21 Feb 2019 07:12:10 +0000
Song Liu <songliubrav...@fb.com> wrote:

> > On Feb 20, 2019, at 4:20 PM, Masami Hiramatsu <mhira...@kernel.org> wrote:
> > 
> > Hi Jann,
> > 
> > On Wed, 20 Feb 2019 17:54:43 +0100
> > Jann Horn <ja...@google.com> wrote:
> >   
> >> The first version of this method was missing the check for
> >> `ret == PATH_MAX`; then such a check was added, but it didn't call kfree()
> >> on error, so there was still a small memory leak in the error case.
> >> Fix it by using strndup_user() instead of open-coding it.
> >>   
> > 
> > This looks good to me.
> > 
> > Reviewed-by: Masami Hiramatsu <mhira...@kernel.org>
> > 
> > BTW, for stable, this is good. For the long term, I think we should
> > fix strndup_user() to return -E2BUG when the user string is longer
> > than max.

OK, I'll add a stable tag (but it wont go until the merge window).

It also shouldn't be called "perf/core" as its in the tracing
directory, and thus "tracing/perf" would be more appropriate. But I see
that's what the patch it fixes calls it too :-/

I'll pull it in.

Thanks everyone!

-- Steve


> > 
> > Thank you,
> >   
> >> Fixes: 0eadcc7a7bc0 ("perf/core: Fix perf_uprobe_init()")
> >> Signed-off-by: Jann Horn <ja...@google.com>  
> 
> Thanks for the fix!
> 
> Acked-by: Song Liu <songliubrav...@fb.com>


Reply via email to