Re: [PATCH] [RFC] i2c: Don't wait for device release in i2c_del_adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 14, 2015 at 07:24:22PM +0200, Pantelis Antoniou wrote:
> I’ll try to dig around tomorrow and see what the real device reference counts
> are, but my hunch goes like this:
> 
> MUX
> +—- ADAPTER
>     +— DEV.
> 
> Mux remove method is called, i2c_del_mux_adapter is called on all the channels
> of the mux, calling in turn i2c_del_adapter which hangs on completion of the
> dev_released.
> 
> The call to device_unregister never calls the device_type callback (i2c_adapter_dev_release)
> because the reference count is not 1 at that point, someone else is having another
> reference.

Who has that reference?  It's not sysfs, right?  Or is it?  How is the
remove method being called, is that coming from a sysfs file?

Having that call "wait" for the other release call to happen is really
old, as Jean points out, from 2003.  We have "fixed" sysfs since then to
detach the files from the devices easier, we used to have some nasy
reference count issues in that area.  Perhaps this isn't needed anymore,
I don't remember the i2c core code at all, that was a long time ago.

thanks,

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



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux