Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2315884rdh; Sun, 29 Oct 2023 10:08:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzFPnFLridLFLNKp53mkQ2Eq+7e0zBQgtGttQ+p52kNw1QigGbu1T3Kx5lGB0mmOjRqgRo X-Received: by 2002:a05:6a20:a11e:b0:153:39d9:56fe with SMTP id q30-20020a056a20a11e00b0015339d956femr7008983pzk.47.1698599283955; Sun, 29 Oct 2023 10:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698599283; cv=none; d=google.com; s=arc-20160816; b=h37ssmu4DCxbHLV9o7jnStBdy8NcjeXrgHnIIH2lbsEYGF5Ajq5cbvEHcPSf4nYJmY m6UKhAhXjS8OmCfVVE3JqWwJr2yeiJsYWEOeASTzZa9sNXQivMnEpZyL6HWv2rl8OxHx PeF5NZhovN4kAzLkTHvokMtDqXJ/uLRxPvGlPapkuwyQK7CatSj0hiCXZLbcKf6jpxDV 6/22TEFNqoZBX2hB/j1DG5CbqeNY6hPm+GCW2an74n9gb+bR9tDc9nXU+13agsMmu73f mHAbxg8PXY8mH6gv2ouAvnM9yUUbec9FnlSCtoWlWcnAUw10ykyg60oZ8MpnBZi9/+/V 1/Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=CwjmesJBPd77RraX0VXEJ5fpmp3TmiDHUFN/EhxgGxI=; fh=rSR5bg2ltY4VQIG1ASfrpS76ksKewfDg2ekOXtNBiFQ=; b=uYsKRtd9F1A+GZ3ehdLYCufh4b2CUMLaSrzxWuDaYORlkIlenyMtNvz2DOZqhpVE3s jt8S2zRE5GP2GYZctu2zBnivOl1+tbmaAUy0Ccm69hvFDcOX97TG0ltxbXs0MXPEMdXT IAOjz0sZR4E4Doy/G4SGTf+N09PwLqGxLoVgMxpmziPxYjU6t3KZLEYs9aYjuPN1cZ0k 2kQb39V8FT6TAU0WKnbwc3v2E3DflRLzJdZq+6hEj23P6YhxPmQbuSH62ayfXM15FvcC SeNYtCOZ8TjomEmVboePIZqIY1sDrsPnfLp651NY4BnKrGJMZq9JNC8fUQGb4Wq8QYLJ IEyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XQbDmpBO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r18-20020a170903015200b001c9c9251e05si3843190plc.476.2023.10.29.10.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 10:08:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XQbDmpBO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D28CD8062BA2; Sun, 29 Oct 2023 10:08:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230240AbjJ2RHz (ORCPT + 99 others); Sun, 29 Oct 2023 13:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjJ2RHx (ORCPT ); Sun, 29 Oct 2023 13:07:53 -0400 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [IPv6:2001:41d0:203:375::ae]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F65AC9 for ; Sun, 29 Oct 2023 10:07:51 -0700 (PDT) Message-ID: <1b463b8a-eac0-4894-b265-da1d3e51c674@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1698599269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CwjmesJBPd77RraX0VXEJ5fpmp3TmiDHUFN/EhxgGxI=; b=XQbDmpBOLN53bjspOhw7G4X/xCSZRhmYT6bEkgzQPOdJunYr9MryJGIPcEh+IqVd7xcMBO yQDcR7W+7lzew3Fqf6oH1O8YsfSoVeHubyMyd8WtA58cBWSly5DedTyPSSpnnhx4LiaCCZ wuToRNnwdmOb4VSSDe+mmdFeStEb5JI= Date: Sun, 29 Oct 2023 10:07:44 -0700 MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v3 2/2] selftests/bpf: Add malloc failure checks in bpf_iter Content-Language: en-GB To: Yuran Pereira , bpf@vger.kernel.org Cc: sinquersw@gmail.com, ast@kernel.org, brauner@kernel.org, daniel@iogearbox.net, haoluo@google.com, iii@linux.ibm.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, kuifeng@meta.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, mykolal@fb.com, sdf@google.com, shuah@kernel.org, song@kernel.org, linux-kernel-mentees@lists.linuxfoundation.org References: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 29 Oct 2023 10:08:02 -0700 (PDT) On 10/27/23 10:24 PM, Yuran Pereira wrote: > Since some malloc calls in bpf_iter may at times fail, > this patch adds the appropriate fail checks, and ensures that > any previously allocated resource is appropriately destroyed > before returning the function. > > Signed-off-by: Yuran Pereira Acked-by: Yonghong Song