[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190523202754.GA3980@cz.tnic>
Date: Thu, 23 May 2019 22:28:17 +0200
From: Borislav Petkov <bp@...en8.de>
To: "Ghannam, Yazen" <Yazen.Ghannam@....com>
Cc: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tony.luck@...el.com" <tony.luck@...el.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH] x86/MCE: Statically allocate mce_banks_array
On Thu, May 23, 2019 at 03:03:55PM +0000, Ghannam, Yazen wrote:
> From: Yazen Ghannam <yazen.ghannam@....com>
>
> The MCE control data is stored in an array of struct mce_banks. This
> array has historically been shared by all CPUs and it was allocated
> dynamically during the first CPU's init sequence.
>
> However, starting with
>
> 5b0883f5c7be ("x86/MCE: Make mce_banks a per-CPU array")
>
> the array was changed to become a per-CPU array. Each CPU would
> dynamically allocate the array during its own init sequence.
>
> This seems benign expect when "Lock Debugging" config options are
> enabled in which case the following message appears.
>
> BUG: sleeping function called from invalid context at mm/slab.h:418
>
> The message appears during the secondary CPUs' init sequences. This seems
> to be because these CPUs are in system_state=SYSTEM_SCHEDULING compared
> to the primary CPU which is in system_state=SYSTEM_BOOTING.
>
> Allocate the mce_banks_array statically so that this issue can be
> avoided.
>
> Also, remove the now unnecessary return values from
> __mcheck_cpu_mce_banks_init() and __mcheck_cpu_cap_init().
>
> Fixes: 5b0883f5c7be ("x86/MCE: Make mce_banks a per-CPU array")
> Reported-by: kernel test robot <rong.a.chen@...el.com>
> Suggested-by: Borislav Petkov <bp@...e.de>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
> ---
> arch/x86/kernel/cpu/mce/core.c | 39 ++++++++++++----------------------
> 1 file changed, 14 insertions(+), 25 deletions(-)
Can you rediff this patch against tip/master please?
It fixes a patch which is already in -rc1 so it needs to go first, into
urgent, before your patchset.
Thx.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply. Srsly.
Powered by blists - more mailing lists