lkml.org 
[lkml]   [2005]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG in i2c_detach_client
On Thu, Jun 09, 2005 at 05:57:44PM +0200, Jean Delvare wrote:
> Hi Andrew,
>
> > Mystery solved.
> >
> > ERROR3:
> > i2c_detach_client(data->lm75[1]); <-- HERE
> > i2c_detach_client(data->lm75[0]);
> > kfree(data->lm75[1]);
> > kfree(data->lm75[0]);
> >
> > The missing i2c_detach_client call meant that data->lm75[1] was still
> > on the list of i2c devices when it was freed. This was corrupting the
> > list. The ERROR3 path now works on my kernel.
>
> Oh my, I had it right under my nose and didn't see it ;) Thanks for the
> clarification.
>
> Greg, please apply the following patch on top of the hwmon patches until
> Mark submits an updated version of the whole thing.
>
> ----------------------------------
>
> Fix a broken error path in the asb100 driver.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
>
> --- linux-2.6.12-rc6/drivers/i2c/chips/asb100.c.orig Wed Jun 8 09:47:53 2005
> +++ linux-2.6.12-rc6/drivers/i2c/chips/asb100.c Thu Jun 9 11:58:34 2005
> @@ -859,6 +859,7 @@
> return 0;
>
> ERROR3:
> + i2c_detach_client(data->lm75[1]);
> i2c_detach_client(data->lm75[0]);
> kfree(data->lm75[1]);
> kfree(data->lm75[0]);

Hm, what tree is this against? Am I missing some inbetween patch here?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-10 08:03    [W:0.401 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site