public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Guo Heyi <heyi.guo@linaro.org>
To: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
Cc: Guo Heyi <heyi.guo@linaro.org>,
	edk2-devel@lists.01.org, 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:28:41 +0800	[thread overview]
Message-ID: <20180224082841.GB111715@SZX1000114654> (raw)
In-Reply-To: <51de13de-ff0f-2bc8-dfb8-a6ea0685f3c6@Intel.com>

On Sat, Feb 24, 2018 at 04:20:52PM +0800, Ni, Ruiyu wrote:
> 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?

That's fine for me :)

Thanks,

Gary (Heyi Guo)

> 
> >
> >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


  reply	other threads:[~2018-02-24  8:22 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
2018-02-24  8:28   ` Guo Heyi [this message]
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=20180224082841.GB111715@SZX1000114654 \
    --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