Re: device_remove_file and disconnect

From: Dmitry Torokhov
Date: Sat Jul 02 2005 - 23:41:41 EST


On Thursday 30 June 2005 12:04, Greg KH wrote:
> Hm, in thinking about it, it might make more sense to rework the usb
> core to handle this better.  Possibly add a release() callback to the
> driver when the device is actually being freed.  Wouldn't be that hard
> to do so, and might cut down on some of the common locking errors.
>

I amafraid this will not help in this particular case - the problem is
with driver-specific memory which is freed way before device disappears.
Consider unloading aiptek module - we need to free aiptek structure when
we unbinding driver but corrsponding USB device will stay there (fully
fucntional with its 'struct device' not going anywhere) until you
physically pull tablet's cord out.

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