diff options
author | David S. Miller <davem@davemloft.net> | 2018-11-28 22:10:54 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-28 22:10:54 -0800 |
commit | e561bb29b650d2817d10a4858f1817836ed08399 (patch) | |
tree | 0bc92b5bb8a287a8e4a88732f3c64b56d126da58 /tools/bpf/bpftool/prog.c | |
parent | 62e3a931788223048120357ab3f29dcb55c5ef79 (diff) | |
parent | 60b548237fed4b4164bab13c994dd9615f6c4323 (diff) | |
download | linux-stable-e561bb29b650d2817d10a4858f1817836ed08399.tar.gz linux-stable-e561bb29b650d2817d10a4858f1817836ed08399.tar.bz2 linux-stable-e561bb29b650d2817d10a4858f1817836ed08399.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Trivial conflict in net/core/filter.c, a locally computed
'sdif' is now an argument to the function.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r-- | tools/bpf/bpftool/prog.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 37b1daf19da6..cb18429818ec 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -359,10 +359,9 @@ static void print_prog_plain(struct bpf_prog_info *info, int fd) if (!hash_empty(prog_table.table)) { struct pinned_obj *obj; - printf("\n"); hash_for_each_possible(prog_table.table, obj, hash, info->id) { if (obj->id == info->id) - printf("\tpinned %s\n", obj->path); + printf("\n\tpinned %s", obj->path); } } @@ -912,6 +911,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) } NEXT_ARG(); } else if (is_prefix(*argv, "map")) { + void *new_map_replace; char *endptr, *name; int fd; @@ -945,12 +945,15 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) if (fd < 0) goto err_free_reuse_maps; - map_replace = reallocarray(map_replace, old_map_fds + 1, - sizeof(*map_replace)); - if (!map_replace) { + new_map_replace = reallocarray(map_replace, + old_map_fds + 1, + sizeof(*map_replace)); + if (!new_map_replace) { p_err("mem alloc failed"); goto err_free_reuse_maps; } + map_replace = new_map_replace; + map_replace[old_map_fds].idx = idx; map_replace[old_map_fds].name = name; map_replace[old_map_fds].fd = fd; |