Staphane Voltz has fixed this points:
- use usb_kill_urb
- Leaking an urb in the error path
- use SLAB_KERNEL
Please download last version of the patch on SF.
Regarding resource freeing in usb_acecad_disconnect() all other driver
do the same. Are they all wrong ?
Regarding Open/Close serialization, would anyone have the "right code"
so that we could know how to do that correctly ?
Regards,
Edouard
Dmitry Torokhov a écrit :
On Monday 30 May 2005 01:47, Oliver Neukum wrote:
Am Montag, 30. Mai 2005 06:37 schrieb Dmitry Torokhov:
On Sunday 29 May 2005 10:23, Oliver Neukum wrote:
Am Sonntag, 29. Mai 2005 15:42 schrieb Giuseppe Bilotta:
Hello all,
I have a an Acecad/[EMAIL PROTECTED] graphic tablet. There are drivers for it
available on the Internet (see for examples
http://acecad.sourceforge.net/ and the pages linked from there,
although the wanadoo.fr page at the top is temporarily unavailable),
but it seems they have not been merged into mainline. Is there a
particular reason for it?
The author hasn't submitted it.
While we are at it:
+static void usb_acecad_close(struct input_dev *dev)
+{
+ struct usb_acecad *acecad = dev->private;
+
+ if (!--acecad->open)
+ usb_unlink_urb(acecad->irq);
+}
Use usb_kill_urb()
While we are at it the whole deal with using an unprotected counter in
open/close routines is quite racy. There are patches in input tree to
serialize open/close calls and call them only when needed so the counter
is not needed at all.
Isn't that protected by lock_kernel() in open() of character devices?
input_{open|close}_device are not necessarily called in context of
character device opening/closing. For example input_close_device us
called in input handler's disconnect() methods and as far as input API
goes we should not tie it to character devices.
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel