* [PATCH] platform/x86/hp: hp-bioscfg: Fix kobject warnings for empty attribute names
@ 2026-01-14 22:17 Mario Limonciello
2026-01-15 12:16 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2026-01-14 22:17 UTC (permalink / raw)
To: mario.limonciello, jorge.lopez2, hansg, ilpo.jarvinen; +Cc: platform-driver-x86
The hp-bioscfg driver attempts to register kobjects with empty names when
the HP BIOS returns attributes with empty name strings. This causes
multiple kernel warnings:
kobject: (00000000135fb5e6): attempted to be registered with empty name!
WARNING: CPU: 14 PID: 3336 at lib/kobject.c:219 kobject_add_internal+0x2eb/0x310
Add validation in hp_init_bios_buffer_attribute() to check if the
attribute name is empty after parsing it from the WMI buffer. If empty,
log a debug message and skip registration of that attribute, allowing the
module to continue processing other valid attributes.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
index 5bfa7159f5bc..5bee916429aa 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -781,6 +781,12 @@ static int hp_init_bios_buffer_attribute(enum hp_wmi_data_type attr_type,
if (ret < 0)
goto buff_attr_exit;
+ if (strlen(str) == 0) {
+ pr_debug("Ignoring attribute with empty name\n");
+ ret = 0;
+ goto buff_attr_exit;
+ }
+
if (attr_type == HPWMI_PASSWORD_TYPE ||
attr_type == HPWMI_SECURE_PLATFORM_TYPE)
temp_kset = bioscfg_drv.authentication_dir_kset;
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86/hp: hp-bioscfg: Fix kobject warnings for empty attribute names
2026-01-14 22:17 [PATCH] platform/x86/hp: hp-bioscfg: Fix kobject warnings for empty attribute names Mario Limonciello
@ 2026-01-15 12:16 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-01-15 12:16 UTC (permalink / raw)
To: Mario Limonciello; +Cc: jorge.lopez2, Hans de Goede, platform-driver-x86
On Wed, 14 Jan 2026, Mario Limonciello wrote:
> The hp-bioscfg driver attempts to register kobjects with empty names when
> the HP BIOS returns attributes with empty name strings. This causes
> multiple kernel warnings:
>
> kobject: (00000000135fb5e6): attempted to be registered with empty name!
> WARNING: CPU: 14 PID: 3336 at lib/kobject.c:219 kobject_add_internal+0x2eb/0x310
>
> Add validation in hp_init_bios_buffer_attribute() to check if the
> attribute name is empty after parsing it from the WMI buffer. If empty,
> log a debug message and skip registration of that attribute, allowing the
> module to continue processing other valid attributes.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
A Fixes tag?
> ---
> drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
> index 5bfa7159f5bc..5bee916429aa 100644
> --- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
> +++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
> @@ -781,6 +781,12 @@ static int hp_init_bios_buffer_attribute(enum hp_wmi_data_type attr_type,
> if (ret < 0)
> goto buff_attr_exit;
>
> + if (strlen(str) == 0) {
+ #include.
> + pr_debug("Ignoring attribute with empty name\n");
This too seems to lack an include.
(Both problems seem to pre-exist.)
> + ret = 0;
> + goto buff_attr_exit;
> + }
> +
> if (attr_type == HPWMI_PASSWORD_TYPE ||
> attr_type == HPWMI_SECURE_PLATFORM_TYPE)
> temp_kset = bioscfg_drv.authentication_dir_kset;
>
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-15 12:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 22:17 [PATCH] platform/x86/hp: hp-bioscfg: Fix kobject warnings for empty attribute names Mario Limonciello
2026-01-15 12:16 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox