> Yes, this is a problem, the module can be unloaded and then the
> completion fuction can be called.

If that happens your disconnect() is buggy independent of module
unload.

> I talked a lot with Rusty about this problem, and he insists that the
> new module reference counts are lightweight enough to handle this
> properly.  Meaning that we need to increment the module count for every
> urb in flight.  He's going to do the same thing for skbufs.

Which is a very bad idea.

> Only bad thing with this change is we need to change the api somehow to
> get the module reference to be assigned to the urb.  We can do this
> either through changing the usb_submit_urb() function, or changing the
> urb to point to the interface it is bound to, not the dev (the interface
> has a pointer to the driver which has the pointer to the module
> reference).  Any opinions on which would be better to use?

It would be best not to do this at all. It just shifts problems.
Besides, it leads to modules that are maybe unloadable.

If you want something really simple concerning module unload,
drop the ability to unload modules bound to a device. Increment
on probe() decrement on disconnect().

        Regards
                Oliver



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to