From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Wu, Jiaxin" <jiaxin.wu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wang, Fan" <fan.wang@intel.com>, "Ye, Ting" <ting.ye@intel.com>
Subject: Re: [Patch] MdeModulePkg/Mtftp4Dxe: Restore the TPL before the poll function.
Date: Thu, 1 Mar 2018 11:02:32 +0000 [thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58B4495F8@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20180301093828.16440-2-jiaxin.wu@intel.com>
Hi, Jiaxin
Do you mean the code which calls MTFTP4->Poll() at TPL_CALLBACK will cause system hang? This should not happen because all network protocol should be able to run at TPL_CALLBACK.
BestRegards
Fu Siyuan
> -----Original Message-----
> From: Wu, Jiaxin
> Sent: Thursday, March 1, 2018 5:38 PM
> To: edk2-devel@lists.01.org
> Cc: Wang, Fan <fan.wang@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Ye,
> Ting <ting.ye@intel.com>
> Subject: [Patch] MdeModulePkg/Mtftp4Dxe: Restore the TPL before the poll
> function.
>
> This patch is to fix the hang issue, which was enrolled by the commit of
> 39b0867d.
> The TPL should be restored before calling poll function at TPL_CALLBACK.
>
> Cc: Wang Fan <fan.wang@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> ---
> MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> index f5f9e6d8f7..64e0463dd9 100644
> --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> @@ -507,24 +507,27 @@ Mtftp4Start (
> if (EFI_ERROR (Status)) {
> Status = EFI_DEVICE_ERROR;
> goto ON_ERROR;
> }
>
> + //
> + // Restore the TPL now, don't call poll function at TPL_CALLBACK.
> + //
> + gBS->RestoreTPL (OldTpl);
> +
> if (Token->Event != NULL) {
> - gBS->RestoreTPL (OldTpl);
> return EFI_SUCCESS;
> }
>
> //
> // Return immediately for asynchronous operation or poll the
> // instance for synchronous operation.
> //
> while (Token->Status == EFI_NOT_READY) {
> This->Poll (This);
> }
> -
> - gBS->RestoreTPL (OldTpl);
> +
> return Token->Status;
>
> ON_ERROR:
> Mtftp4CleanOperation (Instance, Status);
> gBS->RestoreTPL (OldTpl);
> --
> 2.16.2.windows.1
next prev parent reply other threads:[~2018-03-01 10:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 9:38 [Patch] NetworkPkg/Udp6Dxe: Fix the failure to leave one multicast group address Jiaxin Wu
2018-03-01 9:38 ` [Patch] MdeModulePkg/Mtftp4Dxe: Restore the TPL before the poll function Jiaxin Wu
2018-03-01 11:02 ` Fu, Siyuan [this message]
2018-03-02 1:17 ` Wu, Jiaxin
2018-03-02 1:23 ` Fu, Siyuan
2018-03-02 1:40 ` Wu, Jiaxin
2018-03-01 10:57 ` [Patch] NetworkPkg/Udp6Dxe: Fix the failure to leave one multicast group address Fu, Siyuan
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=B1FF2E9001CE9041BD10B825821D5BC58B4495F8@SHSMSX103.ccr.corp.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