lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v3 19/37] bpf tools: Clear libelf and ELF parsing resrouce to finish opening
Em Mon, May 18, 2015 at 11:36:07AM -0700, Alexei Starovoitov escreveu:
> On 5/17/15 3:56 AM, Wang Nan wrote:
> >After all eBPF programs in an object file are loaded, related ELF
> >information is useless. Close the object file and free those memory.
> >
> >Signed-off-by: Wang Nan <wangnan0@huawei.com>
> >---
> > tools/lib/bpf/libbpf.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> >index ded96cb..9ed8cca 100644
> >--- a/tools/lib/bpf/libbpf.c
> >+++ b/tools/lib/bpf/libbpf.c
> >@@ -687,8 +687,8 @@ struct bpf_object *bpf_open_object(const char *path)
> > if (bpf_obj_validate(obj))
> > goto out;
> >
> >+ bpf_obj_clear_elf(obj);
> > return obj;
> >-
> > out:
> > bpf_close_object(obj);
> > return NULL;
> >
>
> looks like a bug in some previous patch in the same set.
> Should be squashed with that patch?

Right, please don't introduce bugs + fixes, we love bisecting :-)

- Arnaldo


\
 
 \ /
  Last update: 2015-05-18 23:21    [W:0.093 / U:1.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site