提交 b6d20799 编写于 作者: X Xu Kuohai 提交者: Andrii Nakryiko

bpf: Fix a typo in comment for DFS algorithm

There is a typo in comment for DFS algorithm in bpf/verifier.c. The top
element should not be popped until all its neighbors have been checked.
Fix it.

Fixes: 475fb78f ("bpf: verifier (add branch/goto checks)")
Signed-off-by: NXu Kuohai <xukuohai@huawei.com>
Signed-off-by: NAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221027034458.2925218-1-xukuohai@huaweicloud.com
上级 96f341a4
...@@ -10670,7 +10670,7 @@ static int check_return_code(struct bpf_verifier_env *env) ...@@ -10670,7 +10670,7 @@ static int check_return_code(struct bpf_verifier_env *env)
* 3 let S be a stack * 3 let S be a stack
* 4 S.push(v) * 4 S.push(v)
* 5 while S is not empty * 5 while S is not empty
* 6 t <- S.pop() * 6 t <- S.peek()
* 7 if t is what we're looking for: * 7 if t is what we're looking for:
* 8 return t * 8 return t
* 9 for all edges e in G.adjacentEdges(t) do * 9 for all edges e in G.adjacentEdges(t) do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册