lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH bpf v2] tools: bpftool: fix infinite loop in map create
From
Date
On 04/12/2019 02:40 PM, Alban Crequy wrote:
> From: Alban Crequy <alban@kinvolk.io>
>
> "bpftool map create" has an infinite loop on "while (argc)". The error
> case is missing.
>
> 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
>
> After the patch:
> $ sudo bpftool map create /sys/fs/bpf/dir/foobar hash key 8 value 8 entries 128
> Error: unknown arg hash
>
> Fixes: 0b592b5a01be ("tools: bpftool: add map create command")
> Signed-off-by: Alban Crequy <alban@kinvolk.io>

Applied, thanks!

\
 
 \ /
  Last update: 2019-04-16 11:29    [W:0.062 / U:10.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site