Re: Two usbfs users can claim the same interface

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

 



On Fri, Oct 02, 2009 at 03:55:57PM +0100, David Vrabel wrote:
> 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.

Why not?  How do we tell if a device is "in use"?

What is the problem you are seeing here?

thanks,

greg k-h
--
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