From: "Zhang, Shenglei" <shenglei.zhang@intel.com>
To: devel@edk2.groups.io
Cc: Siyuan Fu <siyuan.fu@intel.com>, Jiaxin Wu <jiaxin.wu@intel.com>
Subject: [PATCH] NetworkPkg/DpcDxe: Update the consequent logic when DpcEntry is NULL
Date: Sat, 12 Oct 2019 15:43:01 +0800 [thread overview]
Message-ID: <20191012074302.11928-1-shenglei.zhang@intel.com> (raw)
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 <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
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);
//
- // If the allocation of a DPC entry fails, and the free list is empty,
- // then return EFI_OUT_OF_RESOURCES.
+ // If the allocation of a DPC entry fails, return EFI_OUT_OF_RESOURCES.
//
if (DpcEntry == NULL) {
- if (IsListEmpty (&mDpcEntryFreeList)) {
- ReturnStatus = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
+ ReturnStatus = EFI_OUT_OF_RESOURCES;
+ goto Done;
}
//
--
2.18.0.windows.1
next reply other threads:[~2019-10-12 7:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 7:43 Zhang, Shenglei [this message]
2019-10-12 7:43 ` [PATCH] NetworkPkg/DxeNetLib: Change the order of conditions in IF statement Zhang, Shenglei
2019-10-14 2:21 ` Siyuan, Fu
2019-10-14 9:46 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-10-12 7:58 ` [PATCH] NetworkPkg/DpcDxe: Update the consequent logic when DpcEntry is NULL Siyuan, Fu
2019-10-12 8:42 ` Zhang, Shenglei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191012074302.11928-1-shenglei.zhang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox