/* disconnect kernel driver from interface */
        case USBDEVFS_DISCONNECT:

                /* don't allow the user to unbind the hub driver from
                 * a hub with children to manage */
                for (i = 0; i < ps->dev->maxchild; ++i) {
                        if (ps->dev->children[i])
                                retval = -EBUSY;
                }
                if (retval)
                        break;

                down_write(&usb_bus_type.subsys.rwsem);

This seems like a race condition if the semaphore is down.
Maybe we should disallow disconnecting the hub driver altogether.

        Regards
                Oliver




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to