[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFLV2YMOzXe4iP-I@agluck-desk3>
Date: Wed, 18 Jun 2025 08:06:01 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
Cc: Borislav Petkov <bp@...en8.de>, marmarek@...isiblethingslab.com,
James Morse <james.morse@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Robert Richter <rric@...nel.org>, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] EDAC/igen6: Fix NULL pointer dereference
On Wed, Jun 18, 2025 at 11:18:55AM +0800, Qiuxu Zhuo wrote:
> A kernel panic was reported with the following kernel log:
>
> EDAC igen6: Expected 2 mcs, but only 1 detected.
> BUG: unable to handle page fault for address: 000000000000d570
> ...
> Hardware name: Notebook V54x_6x_TU/V54x_6x_TU, BIOS Dasharo (coreboot+UEFI) v0.9.0 07/17/2024
> RIP: e030:ecclog_handler+0x7e/0xf0 [igen6_edac]
> ...
> igen6_probe+0x2a0/0x343 [igen6_edac]
> ...
> igen6_init+0xc5/0xff0 [igen6_edac]
> ...
>
> This issue occurred because one memory controller was fused off by
Maybe "disabled by BIOS" rather than "fused off by BIOS".
> the BIOS but the igen6_edac driver still checked all the memory
> controllers, including this absent one, to identify the source of
> the error. Accessing the null MMIO for the absent memory controller
> resulted in the oops above.
>
> Fix this issue by reverting the configuration structure to non-const
> and updating the field 'res_cfg->num_imc' to reflect the number of
> detected memory controllers.
>
> Fixes: 20e190b1c1fd ("EDAC/igen6: Skip absent memory controllers")
> Reported-by: Marek Marczykowski-Górecki <marmarek@...isiblethingslab.com>
> Closes: https://lore.kernel.org/all/aFFN7RlXkaK_loQb@mail-itl/
> Suggested-by: Borislav Petkov <bp@...en8.de>
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
[snip]
> @@ -1350,9 +1350,11 @@ static int igen6_register_mcis(struct pci_dev *pdev, u64 mchbar)
> return -ENODEV;
> }
>
> - if (lmc < res_cfg->num_imc)
> + if (lmc < res_cfg->num_imc) {
> igen6_printk(KERN_WARNING, "Expected %d mcs, but only %d detected.",
> res_cfg->num_imc, lmc);
KERN_WARNING seems overly dramatic. BIOS likely had good reasons to
disable the memory controller (e.g. it isn't connected to any DIMM
slots on the motherboard for this system). So there's nothing actually
wrong that needs to be fixed.
KERN_INFO is enough. Perhaps KERN_DEBUG?
-Tony
Powered by blists - more mailing lists