lkml.org 
[lkml]   [2019]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH bpf-next v1 1/7] tools: bpftool: fix infinite loop
On Wed, 20 Mar 2019 18:33:26 +0100, Alban Crequy wrote:
> From: Alban Crequy <alban@kinvolk.io>
>
> Symptoms: when forgetting to type the keyword 'type' in front of 'hash':
> $ sudo bpftool map create /sys/fs/bpf/dir/foobar hash key 8 value 8 entries 128
> (infinite loop, taking all the CPU)
> ^C
>

Please add:

Fixes: 0b592b5a01be ("tools: bpftool: add map create command")

here. And submit this one for the bpf tree.

> Signed-off-by: Alban Crequy <alban@kinvolk.io>

> diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
> index e0c650d91784..994a7e0d16fb 100644
> --- a/tools/bpf/bpftool/map.c
> +++ b/tools/bpf/bpftool/map.c
> @@ -1151,6 +1151,9 @@ static int do_create(int argc, char **argv)
> return -1;
> }
> NEXT_ARG();
> + } else {
> + p_err("unknown arg %s", *argv);
> + return -1;
> }
> }
>

\
 
 \ /
  Last update: 2019-03-20 21:55    [W:0.155 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site