[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190320173332.18105-1-alban@kinvolk.io>
Date: Wed, 20 Mar 2019 18:33:26 +0100
From: Alban Crequy <alban.crequy@...il.com>
To: ast@...nel.org, daniel@...earbox.net
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
alban@...volk.io, iago@...volk.io
Subject: [PATCH bpf-next v1 1/7] tools: bpftool: fix infinite loop
From: Alban Crequy <alban@...volk.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
Signed-off-by: Alban Crequy <alban@...volk.io>
---
tools/bpf/bpftool/map.c | 3 +++
1 file changed, 3 insertions(+)
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;
}
}
--
2.20.1
Powered by blists - more mailing lists