X86 platform drivers
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: jorge.lopez2@hp.com, Hans de Goede <hansg@kernel.org>,
	 platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86/hp: hp-bioscfg: Fix kobject warnings for empty attribute names
Date: Thu, 15 Jan 2026 14:16:03 +0200 (EET)	[thread overview]
Message-ID: <b3654571-013d-1a3c-18da-33f67e17d225@linux.intel.com> (raw)
In-Reply-To: <20260114221730.653822-1-mario.limonciello@amd.com>

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.


      reply	other threads:[~2026-01-15 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=b3654571-013d-1a3c-18da-33f67e17d225@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=jorge.lopez2@hp.com \
    --cc=mario.limonciello@amd.com \
    --cc=platform-driver-x86@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox