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] [day] [month] [year] [list]
Message-ID: <2025121835-flattop-july-3c62@gregkh>
Date: Thu, 18 Dec 2025 12:23:55 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
Cc: perex@...ex.cz, rafael@...nel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] PNP: add a put_device() in isapnp_init()

On Thu, Dec 18, 2025 at 04:36:46PM +0800, Haoxiang Li wrote:
> if pnp_register_protocol() 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/isapnp/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
> index 219f96f2aaaf..d6daab7ed59e 100644
> --- a/drivers/pnp/isapnp/core.c
> +++ b/drivers/pnp/isapnp/core.c
> @@ -983,8 +983,10 @@ static int __init isapnp_init(void)
>  		return -EBUSY;
>  	}
>  
> -	if (pnp_register_protocol(&isapnp_protocol) < 0)
> +	if (pnp_register_protocol(&isapnp_protocol) < 0) {
> +		put_device(&isapnp_protocol.dev);

Same here, this feels very wrong.

How was this tested?

How was this found?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ