Re: [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
From: Mark Pearson
Date: Tue Jul 07 2026 - 09:38:25 EST
Hi
On Tue, Jul 7, 2026, at 5:15 AM, goutongchen@xxxxxxxxxxxxx wrote:
> From: goutongchen <goutongchen@xxxxxxxxxxxxx>
>
> The maximum BIOS password length returned by the Lenovo platform BIOS/WMI
> exceeded the size assumed by the think_lmi driver's internal static
> buffer, causing the driver to trigger a WARN_ON() during self-checks.
>
> Increase TLMI_PWD_BUFSIZE from 128 to 256 to eliminate the recurring
> Call Trace warnings.
>
> Here is the kernel warning triggered by the bug:
>
> kernel: WARNING: CPU: 4 PID: 665 at drivers/platform/x86/think-lmi.c:326
> kernel: tlmi_get_pwd_settings.constprop.0+0xe6/0x130 [think_lmi]
> kernel: Call Trace:
> kernel: tlmi_analyze+0x31c/0x640 [think_lmi]
> ...
>
> Fixes: 651b57dd4087 ("platform/x86: Move Lenovo files into lenovo subdir")
Minor - but I don't think this is really the culprit :)
> Signed-off-by: goutongchen <goutongchen@xxxxxxxxxxxxx>
> ---
> drivers/platform/x86/lenovo/think-lmi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/think-lmi.h
> b/drivers/platform/x86/lenovo/think-lmi.h
> index 017644323d46..d643cf3b81b0 100644
> --- a/drivers/platform/x86/lenovo/think-lmi.h
> +++ b/drivers/platform/x86/lenovo/think-lmi.h
> @@ -8,7 +8,7 @@
>
> #define TLMI_SETTINGS_COUNT 256
> #define TLMI_SETTINGS_MAXLEN 512
> -#define TLMI_PWD_BUFSIZE 129
> +#define TLMI_PWD_BUFSIZE 256
> #define TLMI_LANG_MAXLEN 4
> #define TLMI_INDEX_MAX 32
>
> --
> 2.20.1
Which platform are you seeing this on please? The maxlen for passwords from the BIOS is supposed to be 128 so I'm intrigued as to where you're seeing different. It maybe should be fixed in a platform BIOS?
Mark