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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BA543F1.6080504@bluewatersys.com>
Date:	Sun, 21 Mar 2010 10:53:53 +1300
From:	Ryan Mallon <ryan@...ewatersys.com>
To:	Wolfram Sang <w.sang@...gutronix.de>
CC:	kernel-janitors@...r.kernel.org, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Anton Vorontsov <cbouatmailru@...il.com>
Subject: Re: [PATCH 02/24] power/ds2782: really clear i2c_clientdata on exit

Wolfram Sang wrote:
> Probably due to a copy & paste bug, clientdata was set again to the data
> structure (which is freed immediately afterwards) when it should be NULLed.

Good catch. Thanks.

Acked-by: Ryan Mallon <ryan@...ewatersys.com>

> Signed-off-by: Wolfram Sang <w.sang@...gutronix.de>
> Cc: Ryan Mallon <ryan@...ewatersys.com>
> Cc: Anton Vorontsov <cbouatmailru@...il.com>
> ---
>  drivers/power/ds2782_battery.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
> index da14f37..6971b85 100644
> --- a/drivers/power/ds2782_battery.c
> +++ b/drivers/power/ds2782_battery.c
> @@ -236,7 +236,7 @@ static int ds2782_battery_remove(struct i2c_client *client)
>  	idr_remove(&battery_id, info->id);
>  	mutex_unlock(&battery_lock);
>  
> -	i2c_set_clientdata(client, info);
> +	i2c_set_clientdata(client, NULL);
>  
>  	kfree(info);
>  	return 0;
> @@ -289,7 +289,7 @@ static int ds2782_battery_probe(struct i2c_client *client,
>  fail_register:
>  	kfree(info->battery.name);
>  fail_name:
> -	i2c_set_clientdata(client, info);
> +	i2c_set_clientdata(client, NULL);
>  	kfree(info);
>  fail_info:
>  	mutex_lock(&battery_lock);

--
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