From nobody Tue May 7 09:04:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+48862+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+48862+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1570866188; cv=none; d=zoho.com; s=zohoarc; b=YPdOnfuhcV2cWNjQG0pEoAXKyeimnY8HMnBlmMMuXxePWcvVr/YJpLOAyMdnaBmavypGYyD+u00iD2Sry/+hZUdFi3dSqDzyn7TBb+S/fuCUpm9JE09zJxvtS3w/jxYXU6b3hEofqbrha+ZkF1bFauakeOjufDSM8NUvDbnI4kQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570866188; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=e29UQvE5V0bznZBHEFDOtHAGJcVbr/xwXkyHvrrLFBw=; b=OOoJZtejO5S36W+GfPQ2WDbhXk73monMdXuXqQR5XELbUF/LQGkVNPgvpxjcq2DxJRiFWJ2znZcQ6gDSjQg3l6VNNUP22dZTaS0puhJ2gKlDSe10p2Sm1TB/rIzWj8SdLLcU1mJ9ff5dW6sJ/Tx2SQ8qp7PtN9nqBN+pzuIVa+k= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+48862+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1570866188453736.7930388061691; Sat, 12 Oct 2019 00:43:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7UUkYY1788612xZurFyxfN22; Sat, 12 Oct 2019 00:43:07 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.2688.1570866187085018288 for ; Sat, 12 Oct 2019 00:43:07 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2019 00:43:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,286,1566889200"; d="scan'208";a="198925953" X-Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 12 Oct 2019 00:43:05 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Siyuan Fu , Jiaxin Wu Subject: [edk2-devel] [PATCH] NetworkPkg/DpcDxe: Update the consequent logic when DpcEntry is NULL Date: Sat, 12 Oct 2019 15:43:01 +0800 Message-Id: <20191012074302.11928-1-shenglei.zhang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,shenglei.zhang@intel.com X-Gm-Message-State: Fe5UP5UZduAVFuuvRhezubSFx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1570866187; bh=3pCxCCKLbKcVjFxq4D+cx6zEzmOOVX4rPm1b6cGMmJk=; h=Cc:Date:From:Reply-To:Subject:To; b=mWGsBv9QioWfj9aMqlr2zDyzn9SDySMX39N0MTfBhXYnlEj3NkAG5kxsqOffJNw9jSs Gl3tBRG2vl/p2wyCrrYNLzfUiTxCKDTAynJbDAntTjK3sWgszOQvXX7M5B9Vps+XLcoSN 3RDn+H9OAFDSlTwwv+9uNYKB7YO4Fvd200U= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If DpcEntry is NULL, it means it failed to be allocated space. ReturnStatus should be EFI_OUT_OF_RESOURCES regardless of the content of mDpcEntryFreeList. Cc: Siyuan Fu Cc: Jiaxin Wu Signed-off-by: Shenglei Zhang --- NetworkPkg/DpcDxe/Dpc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/NetworkPkg/DpcDxe/Dpc.c b/NetworkPkg/DpcDxe/Dpc.c index 8a490949dc8c..ebdb978b254a 100644 --- a/NetworkPkg/DpcDxe/Dpc.c +++ b/NetworkPkg/DpcDxe/Dpc.c @@ -137,14 +137,11 @@ DpcQueueDpc ( gBS->RaiseTPL (TPL_HIGH_LEVEL); =20 // - // If the allocation of a DPC entry fails, and the free list is empt= y, - // then return EFI_OUT_OF_RESOURCES. + // If the allocation of a DPC entry fails, return EFI_OUT_OF_RESOURC= ES. // if (DpcEntry =3D=3D NULL) { - if (IsListEmpty (&mDpcEntryFreeList)) { - ReturnStatus =3D EFI_OUT_OF_RESOURCES; - goto Done; - } + ReturnStatus =3D EFI_OUT_OF_RESOURCES; + goto Done; } =20 // --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48862): https://edk2.groups.io/g/devel/message/48862 Mute This Topic: https://groups.io/mt/34508854/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-