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>] [day] [month] [year] [list]
Date:	Mon, 19 Dec 2011 02:29:43 +0000 (GMT)
From:	ÇÔ¸íÁÖ <myungjoo.ham@...sung.com>
To:	Axel Lin <axel.lin@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:	±èµ¿±Ù <dg77.kim@...sung.com>,
	¹Ú°æ¹Î <kyungmin.park@...sung.com>,
	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <greg@...ah.com>
Subject: Re: [PATCH] misc: Fix irq leak in max8997_muic_probe error path

> Current code does not properly free allocated irqs if request_threaded_irq
> returns error, fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>

Thanks for pointing that out.

Acked-by: MyungJoo Ham <myungjoo.ham@...sung.com>

> ---
>  drivers/misc/max8997-muic.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/misc/max8997-muic.c b/drivers/misc/max8997-muic.c
> index 74a9448..409b7fc 100644
> --- a/drivers/misc/max8997-muic.c
> +++ b/drivers/misc/max8997-muic.c
> @@ -566,10 +566,6 @@ static int __devinit max8997_muic_probe(struct platform_device *pdev)
>  				"failed: irq request (IRQ: %d,"
>  				" error :%d)\n",
>  				muic_irq->irq, ret);
> -
> -			for (i = i - 1; i >= 0; i--)
> -				free_irq(muic_irq->irq, info);
> -
>  			goto err_irq;
>  		}
>  	}
> @@ -583,6 +579,8 @@ static int __devinit max8997_muic_probe(struct platform_device *pdev)
>  	return ret;
>  
>  err_irq:
> +	while (--i >= 0)
> +		free_irq(pdata->irq_base + muic_irqs[i].irq, info);
>  	sysfs_remove_group(&pdev->dev.kobj, &max8997_muic_group);
>  err_sysfs:
>  err_pdata:
> -- 
> 1.7.5.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ