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: <aUBCsTeplCT6oNO-@alpha.franken.de>
Date: Mon, 15 Dec 2025 18:17:37 +0100
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Haoxiang Li <haoxiang_li2024@....com>
Cc: FlorianSchandinat@....de, linux-mips@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] MIPS: Fix a reference leak bug in ip22_check_gio()

On Thu, Dec 04, 2025 at 06:36:18PM +0800, Haoxiang Li wrote:
> If gio_device_register fails, gio_dev_put() is required to
> drop the gio_dev device reference.
> 
> Fixes: e84de0c61905 ("MIPS: GIO bus support for SGI IP22/28")
> Cc: stable@...r.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024@....com>
> ---
>  arch/mips/sgi-ip22/ip22-gio.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c
> index 5893ea4e382c..19b70928d6dc 100644
> --- a/arch/mips/sgi-ip22/ip22-gio.c
> +++ b/arch/mips/sgi-ip22/ip22-gio.c
> @@ -372,7 +372,8 @@ static void ip22_check_gio(int slotno, unsigned long addr, int irq)
>  		gio_dev->resource.flags = IORESOURCE_MEM;
>  		gio_dev->irq = irq;
>  		dev_set_name(&gio_dev->dev, "%d", slotno);
> -		gio_device_register(gio_dev);
> +		if (gio_device_register(gio_dev))
> +			gio_dev_put(gio_dev);
>  	} else
>  		printk(KERN_INFO "GIO: slot %d : Empty\n", slotno);
>  }
> -- 
> 2.25.1

applied to mips-fixes

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ