Re: BUG in i2c_detach_client

Andrew Morton
2005-06-08T23:36:17Z

Andrew James Wade <ajwade@cpe00095b3131a0-cm0011ae8cd564.cpe.net.cable.rogers.com> wrote:
>
> On June 8, 2005 05:26 pm, Andrew Morton wrote:
> > Were there no interesting printks before this BUG hit?
> Nope :-(
>
> > It's due to the kernel running list_del() on a list_head which isn't on a list.
> >
> > Seems there is an error-path bug in that driver, but I don' thtink the fix
> > will fix it. Please test?
> Will do. But I don't think that's it. I've been adding printks to determine the
> execution path and it goes through the ERROR3 path in asb100_detect(), which means
> AFACT that the error path in asb100_detect_subclients() isn't taken:
>
> ERROR3:
> i2c_detach_client(data->lm75[0]);
> kfree(data->lm75[1]);
> kfree(data->lm75[0]);
> ERROR2:
> i2c_detach_client(new_client); // <--- BUG() in here.
> ERROR1:
> kfree(data);
> ERROR0:
> return err;

hm, the tree I have here doesn't do that. What kernel do you have there?

I suggest you work against
http://www.zip.com.au/~akpm/linux/patches/stuff/x.bz2 which is a patch
against 2.6.12-rc6 containing everybody's latest everything.