it seems to me, although this is not a fault of your patch, but an existing bug, that this can be used to probe an already claimed interface.

That's true, partly because usb_probe_interface() is the wrong call to use -- and always has been. It's how the driver model code decides whether to make that driver binding happen.

On the other hand I'm not sure right away what the right
call would be.  I think drivers/base/bus::device_attach()
would be about right, but it seems to have a small "this
function not exported" problem ... :(

And yes, you're right that it shouldn't do anything if
there's already a driver bound to that interface.

- Dave



Shouldn't it rather be

down_write(&ifp->dev.bus->subsys.rwsem);
if (ifp->dev.driver) {
        retval = -EBUSY;
} else {
        retval = usb_probe_interface (&ifp->dev);
}
up_write(&ifp->dev.bus->subsys.rwsem);

        Regards
                Oliver






-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to