[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200817143850.582403114@linuxfoundation.org>
Date: Mon, 17 Aug 2020 17:15:04 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>,
Daniel Borkmann <daniel@...earbox.net>,
Tobias Klauser <tklauser@...tanz.ch>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.8 351/464] tools, bpftool: Fix wrong return value in do_dump()
From: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
[ Upstream commit 041549b7b2c7811ec40e705c439211f00ade2dda ]
In case of btf_id does not exist, a negative error code -ENOENT
should be returned.
Fixes: c93cc69004df3 ("bpftool: add ability to dump BTF types")
Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
Reviewed-by: Tobias Klauser <tklauser@...tanz.ch>
Acked-by: Andrii Nakryiko <andriin@...com>
Acked-by: John Fastabend <john.fastabend@...il.com>
Link: https://lore.kernel.org/bpf/20200802111540.5384-1-tianjia.zhang@linux.alibaba.com
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
tools/bpf/bpftool/btf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index faac8189b2853..c2f1fd414820a 100644
--- a/tools/bpf/bpftool/btf.c
+++ b/tools/bpf/bpftool/btf.c
@@ -596,7 +596,7 @@ static int do_dump(int argc, char **argv)
goto done;
}
if (!btf) {
- err = ENOENT;
+ err = -ENOENT;
p_err("can't find btf with ID (%u)", btf_id);
goto done;
}
--
2.25.1
Powered by blists - more mailing lists