From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Guo Heyi <heyi.guo@linaro.org>, edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Eric Dong <eric.dong@intel.com>
Subject: Re: MdeModulePkg/UefiBootManagerLib: recursive call of BmRepairAllControllers
Date: Sat, 24 Feb 2018 16:20:52 +0800 [thread overview]
Message-ID: <51de13de-ff0f-2bc8-dfb8-a6ea0685f3c6@Intel.com> (raw)
In-Reply-To: <20180224062316.GA111715@SZX1000114654>
On 2/24/2018 2:23 PM, Guo Heyi wrote:
> Hi folks,
>
> In BmDriverHealth.c, function BmRepairAllControllers may recursively call itself
> if some driver health protocol returns EfiDriverHealthStatusReconnectRequired.
> However, if there is something wrong in some 3rd party driver (e.g. PCI oprom),
> the driver health protocol of that driver may always return such status even
> after one and another reconnect. The endless iteration will cause stack overflow
> and then system exception, and it may be not easy to find that the exception is
> actually caused by stack overflow.
yes. I agree.
If a buggy PCI oprom always return ReconnectRequired, the stack overflow
will happen.
How about we choose maximum recursive call depth as 10 and continue to
boot if call depth reaches 11?
>
> So does it make sense to set a maximum count of this recursive call to avoid
> whole system hang even there is a buggy 3rd party driver?
>
> Thanks,
>
> Gary (Heyi Guo)
>
--
Thanks,
Ray
next prev parent reply other threads:[~2018-02-24 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-24 6:23 MdeModulePkg/UefiBootManagerLib: recursive call of BmRepairAllControllers Guo Heyi
2018-02-24 8:20 ` Ni, Ruiyu [this message]
2018-02-24 8:28 ` Guo Heyi
2018-02-24 8:40 ` Ni, Ruiyu
2018-02-24 8:47 ` Guo Heyi
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=51de13de-ff0f-2bc8-dfb8-a6ea0685f3c6@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