diff options
author | Xu Kuohai <xukuohai@huawei.com> | 2022-10-26 23:44:58 -0400 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-10-27 13:10:32 -0700 |
commit | b6d207999c350b19a787e48757f98198d0bf3e5b (patch) | |
tree | 42b6427b16d093c05dd8f8d56fca4c675b1c0af8 /kernel/bpf | |
parent | 96f341a4751d1939a303c5c526b2ca79ebda075f (diff) | |
download | linux-b6d207999c350b19a787e48757f98198d0bf3e5b.tar.gz linux-b6d207999c350b19a787e48757f98198d0bf3e5b.tar.bz2 linux-b6d207999c350b19a787e48757f98198d0bf3e5b.zip |
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: 475fb78fbf48 ("bpf: verifier (add branch/goto checks)")
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221027034458.2925218-1-xukuohai@huaweicloud.com
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/verifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 8f849a763b79..275c2f1f00ee 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -10670,7 +10670,7 @@ static int check_return_code(struct bpf_verifier_env *env) * 3 let S be a stack * 4 S.push(v) * 5 while S is not empty - * 6 t <- S.pop() + * 6 t <- S.peek() * 7 if t is what we're looking for: * 8 return t * 9 for all edges e in G.adjacentEdges(t) do |