From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH bpf 0/2] tools: bpftool: small fixes for error handling in prog load Date: Thu, 21 Jun 2018 23:10:59 +0200 Message-ID: <6e324137-fa4d-df80-902e-ae318d2bd3cd@iogearbox.net> References: <20180620184246.18672-1-jakub.kicinski@netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, oss-drivers@netronome.com To: Jakub Kicinski , alexei.starovoitov@gmail.com Return-path: Received: from www62.your-server.de ([213.133.104.62]:35852 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933248AbeFUVLE (ORCPT ); Thu, 21 Jun 2018 17:11:04 -0400 In-Reply-To: <20180620184246.18672-1-jakub.kicinski@netronome.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/20/2018 08:42 PM, Jakub Kicinski wrote: > Hi! > > Two small fixes for error handling in bpftool prog load, first patch > removes a duplicated message, second one frees resources correctly. > Multiple error messages break JSON: > > # bpftool -jp prog load tracex1_kern.o /sys/fs/bpf/a > { > "error": "can't pin the object (/sys/fs/bpf/a): File exists" > },{ > "error": "failed to pin program" > } > > Jakub Kicinski (2): > tools: bpftool: remove duplicated error message on prog load > tools: bpftool: remember to close the libbpf object on prog load error > > tools/bpf/bpftool/prog.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > Applied to bpf, thanks Jakub!