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: <20130508005702.GB23419@verge.net.au>
Date:	Wed, 8 May 2013 09:57:02 +0900
From:	Simon Horman <horms@...ge.net.au>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Magnus Damm <damm@...nsource.se>,
	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] irqchip: renesas-irqc: Fix irqc_probe error handling

On Mon, May 06, 2013 at 05:03:32PM +0800, Axel Lin wrote:
> The code in goto err3 path is wrong because it will call fee_irq() with k == 0,
> which means it does free_irq(p->irq[-1].requested_irq, &p->irq[-1]);
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
>  drivers/irqchip/irq-renesas-irqc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, I have queued this up for v3.11 in the intc-external-irq branch
of my renesas tree on kernel.org.

> 
> diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
> index 649cd69..3651f77 100644
> --- a/drivers/irqchip/irq-renesas-irqc.c
> +++ b/drivers/irqchip/irq-renesas-irqc.c
> @@ -252,8 +252,8 @@ static int irqc_probe(struct platform_device *pdev)
>  
>  	return 0;
>  err3:
> -	for (; k >= 0; k--)
> -		free_irq(p->irq[k - 1].requested_irq, &p->irq[k - 1]);
> +	while (--k >= 0)
> +		free_irq(p->irq[k].requested_irq, &p->irq[k]);
>  
>  	irq_domain_remove(p->irq_domain);
>  err2:
> -- 
> 1.8.1.2
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ