All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [Xen-devel] [Xen-unstable] boot crash while loading AMD microcode due to commit "microcode/amd: fix memory leak"
Date: Fri, 30 Aug 2019 10:09:36 +0800	[thread overview]
Message-ID: <20190830020934.GA31575@gao-cwp> (raw)
In-Reply-To: <e184002b-f1f9-c1a1-4c58-1d4623538bd0@eikelenboom.it>

[-- Attachment #1: Type: text/plain, Size: 558 bytes --]

On Fri, Aug 30, 2019 at 01:04:54AM +0200, Sander Eikelenboom wrote:
>L.S.,
>
>While testing xen-unstable, my AMD system crashes during early boot while loading microcode with an "Early fatal page fault".
>Reverting commit de45e3ff37bb1602796054afabfa626ea5661c45 "microcode/amd: fix memory leak" fixes the boot issue.

Sorry for this inconvenience.

Could you apply the patch attached and try it again?

>
>At present I don't have my serial console stuff at hand, but if needed I can send the stacktrace tomorrow.
>

Yes. That would be helpful.

Thanks
Chao

[-- Attachment #2: check_mc_old.patch --]
[-- Type: text/x-diff, Size: 532 bytes --]

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index 3069784..9b74330 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -552,9 +552,12 @@ static int cpu_request_microcode(unsigned int cpu, const void *buf,
         mc_old = mc_amd;
     }
 
-    xfree(mc_old->mpb);
-    xfree(mc_old->equiv_cpu_table);
-    xfree(mc_old);
+    if ( mc_old )
+    {
+        xfree(mc_old->mpb);
+        xfree(mc_old->equiv_cpu_table);
+        xfree(mc_old);
+    }
 
   out:
 #if CONFIG_HVM

[-- Attachment #3: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-08-30  2:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 23:04 [Xen-devel] [Xen-unstable] boot crash while loading AMD microcode due to commit "microcode/amd: fix memory leak" Sander Eikelenboom
2019-08-30  2:09 ` Chao Gao [this message]
2019-08-30  7:49   ` Jan Beulich
2019-08-30  8:08     ` Chao Gao
2019-08-30 20:06     ` Sander Eikelenboom

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-all 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=20190830020934.GA31575@gao-cwp \
    --to=chao.gao@intel.com \
    --cc=jbeulich@suse.com \
    --cc=linux@eikelenboom.it \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.