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: <20110331032828.GA19333@ponder.secretlab.ca>
Date:	Wed, 30 Mar 2011 21:28:28 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, Ben Dooks <ben-linux@...ff.org>
Subject: Re: [PATCH] gpio: pca953x: fix error handling path in probe() call

On Thu, Mar 31, 2011 at 07:18:46AM +0900, Mark Brown wrote:
> From: Ben Dooks <ben-linux@...ff.org>
> 
> If the device fails to respond, then the error path tries to remove an
> interrupt that never got registered, which causes an backtrace from the
> interrupt handling code.
> 
> Fix this by ensuring that the cleanup path has two labels and use the
> correct path as needed.
> 
> fixes the following error:
> 
> WARNING: at kernel/irq/manage.c:908 __free_irq+0x80/0x160()
> Trying to free already-free IRQ 0
> 
> Signed-off-by: Ben Dooks <ben-linux@...ff.org>
> Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>

Applied, thanks.

g.

> ---
>  drivers/gpio/pca953x.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
> index 583e925..7630ab7 100644
> --- a/drivers/gpio/pca953x.c
> +++ b/drivers/gpio/pca953x.c
> @@ -558,7 +558,7 @@ static int __devinit pca953x_probe(struct i2c_client *client,
>  
>  	ret = gpiochip_add(&chip->gpio_chip);
>  	if (ret)
> -		goto out_failed;
> +		goto out_failed_irq;
>  
>  	if (pdata->setup) {
>  		ret = pdata->setup(client, chip->gpio_chip.base,
> @@ -570,8 +570,9 @@ static int __devinit pca953x_probe(struct i2c_client *client,
>  	i2c_set_clientdata(client, chip);
>  	return 0;
>  
> -out_failed:
> +out_failed_irq:
>  	pca953x_irq_teardown(chip);
> +out_failed:
>  	kfree(chip->dyn_pdata);
>  	kfree(chip);
>  	return ret;
> -- 
> 1.7.4.1
> 
--
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