patch
Roman Kagan
rkagan at mail.ru
Mon Jan 31 15:27:23 EST 2005
Hi Duncan,
Starting to catch up with the mail since Friday...
On Fri, Jan 28, 2005 at 03:33:26PM +0100, Duncan Sands wrote:
> > + down(&usbatm_driver_list_sem);
> > + list_for_each_entry(driver, &usbatm_driver_list, driver_list)
> > + if (usb_match_id(intf, driver->id_table))
> > + break;
> > + up(&usbatm_driver_list_sem);
> > +
> > if (!driver) {
>
> if there's no matching entry, driver is not NULL, it is (more or less)
> the list head... I'll take care of it.
The matching entry is there, otherwise the USB core wouldn't call
driver's probe, and it holds a reference to the driver's .owner so no
deregister can happen here.
Umm, probably except for a small window between list manipulation and
usb_(de)register in usbatm_(de)register. It can be fixed by moving the
release of the semaphore after the usb_(de)register.
Cheers,
Roman.
More information about the Usbatm
mailing list