lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025121841-unwoven-twelve-e65b@gregkh>
Date: Thu, 18 Dec 2025 12:33:05 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
Cc: rafael@...nel.org, lenb@...nel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] PNP: add a error handling in pnpacpi_init()

On Thu, Dec 18, 2025 at 04:29:03PM +0800, Haoxiang Li wrote:
> Add a error handling for pnp_register_protocol(), and if
> it fails, call put_device() to drop the device reference.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@...r.kernel.org
> Signed-off-by: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
> ---
>  drivers/pnp/pnpacpi/core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
> index a0927081a003..0b63e1748b7c 100644
> --- a/drivers/pnp/pnpacpi/core.c
> +++ b/drivers/pnp/pnpacpi/core.c
> @@ -304,7 +304,10 @@ static int __init pnpacpi_init(void)
>  		return 0;
>  	}
>  	printk(KERN_INFO "pnp: PnP ACPI init\n");
> -	pnp_register_protocol(&pnpacpi_protocol);
> +	if (pnp_register_protocol(&pnpacpi_protocol)) {
> +		put_device(&pnpacpi_protocol.dev);

Again, this looks really wrong.

What tool are you all using to "find" these issues?  Why aren't you
properly documenting it?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ