Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3044421rwb; Mon, 15 Aug 2022 16:48:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR6s5oGaNIE1YQbW2NXGUG0Y9q3SUyKhvqTK8SsaUAABf/new1pFqYoyRcjCxYxePV3nTb2d X-Received: by 2002:a63:f30b:0:b0:429:7f1e:601f with SMTP id l11-20020a63f30b000000b004297f1e601fmr3445895pgh.24.1660607292376; Mon, 15 Aug 2022 16:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660607292; cv=none; d=google.com; s=arc-20160816; b=hLvKaoA/XZXRtFNk0IZlJW63P2bj9wqmvuTQ/NLxJpTrfOEuO5psP4fkx0YZaKGUDZ gZ0jurGVSfT608wiHYeTZyXTwvrt4CkFwgyPkk0EP8MbJpw+PX/g23qsixnpfWc6De/i c7U8rcjg+f4c5bPHe+FH/ughEvCpBNO2WM27f1riF9br4jbDbOjft7qpVldgstzUGjk2 Ucr52kxp1lbH6bjy81jQUkEtLCo5Yi0Ybxz7t4u0kEG0BOF0A5R4t9meb6B9ckzT/Vaz RaLjY48kL5B4m7Yd9lB0ad03XUL5Tx+H5OwuyUwSfnnQW6StzcTRITdgmJfUa2Mo/sHu corA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nJCLKEYE+udoxHS6bxYc/gsp1xXU91KLqSABC4AHcV8=; b=GbhZsoZ8tLz2JC+CVWSX/YdlUydyNqWfx9JnLWfW4IDa3h76GEmoUR2pJJqQKUoxpF f60/M4zdIPK5U9H5J9QPQ9XAf90D/dQwSgNdM1S0/7dRgJK2+MkqzTGUzI3iY0sgBRG+ 3JeH9H9aFpt78fKuN+Lk2UPlC8N1UVUM9BiOoX+hOPyR9ArghKtxoO3FYy08VQgfDNzb ssK8TUhpGv8MfLy9qyRuF7XlZYnFZOId5DgJmR12CL/vvBrWL1uJ9tjxCTu/H8XuYtmT YsjkiAWOR0y/H1AK63SNS6rHoE0tLl/cYfBR0/HSRESVR0NxuZzxiP2SroIOLCvnrtkr VLtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mQosnbe/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a056a00151400b0052f6911360esi12049845pfu.155.2022.08.15.16.48.00; Mon, 15 Aug 2022 16:48:12 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mQosnbe/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354249AbiHOXph (ORCPT + 99 others); Mon, 15 Aug 2022 19:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354288AbiHOXls (ORCPT ); Mon, 15 Aug 2022 19:41:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46E2DF5B1; Mon, 15 Aug 2022 13:11:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D6C5960B9B; Mon, 15 Aug 2022 20:11:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D41B6C433D6; Mon, 15 Aug 2022 20:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594299; bh=umu5Qdb7zS/cnY4uOR10gFUBOzmjDd7cXOrW7/1kgDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQosnbe/+YJLiaoC4wq6go5MGrK7+uxXsUV6uYAzAJxpXJpYaRe5bAglI8p78viDG 8jLs1/RERKnOEseqdFxXFJz8ZbEGnsctXlJLlJMK6dGQDwkj9tvY2cTPiX/Wbpvn91 ml6WvvptAY7TurzYRqYy6YHt56ykGNIz5EPTq/fg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Kumar Kartikeya Dwivedi , Daniel Borkmann Subject: [PATCH 5.18 1089/1095] bpf: Suppress passing zero to PTR_ERR warning Date: Mon, 15 Aug 2022 20:08:08 +0200 Message-Id: <20220815180514.073914895@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: Kumar Kartikeya Dwivedi commit 1ec5ee8c8a5a65ea377f8bea64bf4d5b743f6f79 upstream. Kernel Test Robot complains about passing zero to PTR_ERR for the said line, suppress it by using PTR_ERR_OR_ZERO. Fixes: c0a5a21c25f3 ("bpf: Allow storing referenced kptr in map") Reported-by: kernel test robot Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220521132620.1976921-1-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -5327,7 +5327,7 @@ static int process_kptr_func(struct bpf_ return -EINVAL; } if (!map_value_has_kptrs(map_ptr)) { - ret = PTR_ERR(map_ptr->kptr_off_tab); + ret = PTR_ERR_OR_ZERO(map_ptr->kptr_off_tab); if (ret == -E2BIG) verbose(env, "map '%s' has more than %d kptr\n", map_ptr->name, BPF_MAP_VALUE_OFF_MAX);