Re: Two usbfs users can claim the same interface

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

 



Alan Stern wrote:
> On Thu, 1 Oct 2009, David Vrabel wrote:
> 
>> If process A has an interface claimed and process B disconnects the
>> kernel driver then process B can also claim the interface.
>>
>> I think USBFSDEV_DISCONNECT shouldn't disconnect the usbfs driver.
> 
> That statement certainly could be the subject of a prolonged
> discussion.  Hence I'm CC-ing the libusb mailing list; people there may
> have some strong opinions on this matter.
> 
>> Something like this (untested) patch.  Is this the correct approach or
>> should userspace processes be more co-operative?  e.g., by making
>> libusb's libusb_kernel_driver_active() returning false if driver ==
>> "usbfs" and expecting users to only call libusb_detach_kernel_driver()
>> if one is active.
> 
> There might be programs which really _do_ want to unbind other
> programs, so ruling out that capability in the kernel is likely to be a
> mistake.  My preference is to let userspace sort this out.

If we do want to allow this behaviour we certainly don't want user B
able to disconnect the usbfs driver from a device in use by user A.

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux