Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp81070rwi; Tue, 25 Oct 2022 20:38:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4MVvL5QCNwTwN2H17UlbRimEdIKgODI/L0rvypcto0EhByfNibqH2lCcFEJnuWZnNw9n+g X-Received: by 2002:a17:902:d490:b0:186:c544:8ac7 with SMTP id c16-20020a170902d49000b00186c5448ac7mr5369044plg.158.1666755512543; Tue, 25 Oct 2022 20:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666755512; cv=none; d=google.com; s=arc-20160816; b=h/UMvYrL83zElZkxe5iYMits+xFW5sQi5QUgEqUqPM9ORZUeoI84uzkldkQeXfuUlc x3LvJIckDicuGxsN5tmM8+XcNCE+cIxpnrMapcjMohc1VFxpaZoog8z3eX0EY29lHzze PbY+hKNdbfdQTjTgN/xIU+ynGZwjvR/3QvJy24MElCcK+qdwyoJDtsyQp3LdQGjGDPb/ s8taZuxmxi7/VpsK21tgFiAc0D5sv549nOSYvyNpuLnIB6ODT2xr6YFLE38tiD62kKfx hNBksljllufIDx5v2ggUTm8HB/pYiIEMFdEG1sFH7C7AkKotnqXBwa/HwEkMRCs4PJ9v IIPg== 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=gfmZj4/sG2u1mhhisOrDXvPLRDkSZbfMDyel8r2c1hM=; b=cZ3TsSVabnFu9xijxtYDIuzjTb513vnLkdHua51DpSbG8susxhYxM0fev1AQtMNo02 gRZtKWIPWO/vkjEev60G3yBQrTNG0CFS5GJVr1NtfxsZlp3SKJV+npRbVvItAgupJOHm BDz2c6xic9xYzPd8h0LX0XyDJ8edOgMaL5dgr3BCZFXyhPA9bmWOlaiYXpsrdsTrSmVX MtWo0KL9T14pJgVF35/M8QWMIL6yI37NVcH3ZwO7o4MTOhZy9hfpfQgQS/pMzy7bbWlR ktW1lgJRymKz7hDusL9HdNAq5cVKgR/Jp7+zyE83F91On3A0LRq1dRIXJ3jcMTns8lp+ j1Sg== 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 k19-20020a056a00169300b00565c337c562si5734488pfc.100.2022.10.25.20.38.18; Tue, 25 Oct 2022 20:38: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 S232445AbiJZCmU (ORCPT + 99 others); Tue, 25 Oct 2022 22:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231476AbiJZCmS (ORCPT ); Tue, 25 Oct 2022 22:42:18 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA64760CA7; Tue, 25 Oct 2022 19:42:15 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4MxtMB4ndFzl7yt; Wed, 26 Oct 2022 10:40:06 +0800 (CST) Received: from k01.huawei.com (unknown [10.67.174.197]) by APP3 (Coremail) with SMTP id _Ch0CgDn+lyDnlhj1o8qAw--.33518S2; Wed, 26 Oct 2022 10:42:12 +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] bpf: Fix a typo in comment for DFS algorithm Date: Tue, 25 Oct 2022 22:59:41 -0400 Message-Id: <20221026025941.2621795-1-xukuohai@huaweicloud.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _Ch0CgDn+lyDnlhj1o8qAw--.33518S2 X-Coremail-Antispam: 1UD129KBjvdXoWruFyftr1UJF1DXFyfXFykGrg_yoW3KrgEkr s5Z3ZagrsIq3WfCws3Ca47Xw1jkr15tF18WrnxG39rArWYqw18Wrs5GFn0qa4DZFWUtrZr tF93GrZFqw1Y9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-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 b83a8d420520..96ba5ea6d1a6 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.top() * 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