@@ -888,7 +888,11 @@ read_descriptors(struct file *filp, stru
size_t srclen, n;
int cfgno;
void *src;
+ int retval;
+ retval = usb_lock_device_interruptible(udev);
+ if (retval < 0)
+ return -EINTR;
/* The binary attribute begins with the device descriptor.
* Following that are the raw descriptor entries for all the
* configurations (config plus subsidiary descriptors).
@@ -913,6 +917,7 @@ read_descriptors(struct file *filp, stru
off -= srclen;
}
}
+ usb_unlock_device(udev);
return count - nleft;
}