Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp62098rwi; Wed, 26 Oct 2022 20:37:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6oy4EfDmi9BORg/z6JqAoTl5NzVH75/hQAoXbMyNamHiofh+m5MCUz8dEYNuoymB7Hd80k X-Received: by 2002:a17:907:7203:b0:7a5:b062:2338 with SMTP id dr3-20020a170907720300b007a5b0622338mr19178101ejc.8.1666841852016; Wed, 26 Oct 2022 20:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666841852; cv=none; d=google.com; s=arc-20160816; b=aYcwCNBA0mC0ZM9WxOx0ythbK9mhTGGqtrfvXB7B65G9ynwOpUNWWq3G6MHmIwMor3 EquLnWCLJcLuIM9TRijs+Lh/tlt62OxtILdURLyEt68Hyeha26aTW/l63kWSxk2aXnD2 gTVbutzhGH9RTRzfigsdY6Yk+fyBu5YsDCban0QNFXIRXK0bzjo6Y499QSQBmVlnspUY WpDdhWmHmSJTMg51RR+dqbMgqoOnYchgPj8Wtn06TGhJ5YtoVZ9R58B5Orinpf1aK7uY IW60Gsa0F1I3Z4UwzP48lHKvWswcQut9o1Zj8Yv26sIg8Zv0UocDLRdO2K8JMVPMVt6K 7Mqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=esoB41zGIbZnxld9fwri+jsR/848UeX0EY3z3hEUYtM=; b=fP8SF3FcIwSabwptTILj9ZVxbxegQtL58i0kUlFNHIJrdS5q0QsFqKC51zbQ/BO9/5 RK8vVavXbN5ugHhWNs7u85CJtrJWBI7yDsS9S3++8LNGowKTKSMPcXMmrhIMDGjJXlva lsjqF3YF/egz9Fbm0IRFjK2R5o+5BbU8IByHxNwiq5Y8/t567fLPCaPhQjj+tj24o0NM alAgHa5Rd1Wy40XFczGE3CQ7F/1Nul2X+SabRRqg+zkuOgYNwu3pVASKVBtQ19yMAfNp nBPBR4lpWGASj8uKGzo7dGbWrlMfVUKCfCG4qrpVu5/st+I36B3/x8MhYMGQ6xrHKQoa w1iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m8-20020a50cc08000000b0044f1b7b8713si426742edi.281.2022.10.26.20.37.05; Wed, 26 Oct 2022 20:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233785AbiJ0DaA (ORCPT + 99 others); Wed, 26 Oct 2022 23:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234418AbiJ0D3h (ORCPT ); Wed, 26 Oct 2022 23:29:37 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E35414DF36; Wed, 26 Oct 2022 20:28:39 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4MyWKs0Y0dz6S2cm; Thu, 27 Oct 2022 11:26:09 +0800 (CST) Received: from k01.huawei.com (unknown [10.67.174.197]) by APP4 (Coremail) with SMTP id gCh0CgDH1efj+lljHTQKAQ--.53757S2; Thu, 27 Oct 2022 11:28:36 +0800 (CST) From: Xu Kuohai To: bpf@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "David S . Miller" Subject: [PATCH bpf-next v2] bpf: Fix a typo in comment for DFS algorithm Date: Wed, 26 Oct 2022 23:44:58 -0400 Message-Id: <20221027034458.2925218-1-xukuohai@huaweicloud.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgDH1efj+lljHTQKAQ--.53757S2 X-Coremail-Antispam: 1UD129KBjvdXoWruFyftr1UJF1DXFyfXFykGrg_yoW3KrXEkr s5X3ZagrsxX3ZaywsxCayxXw1jkwn8tF18ZrnxW39rArWYqw18WrZ5JFn8Xa4DAFW8trZr tF93GrWqqw1Y9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb28YFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1l42xK82IY c2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s 026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF 0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0x vE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UWE__UUUUU= X-CM-SenderInfo: 50xn30hkdlqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu Kuohai 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 --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index adf998159897..8c1152c7c289 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -10662,7 +10662,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 -- 2.30.2