On Friday, 25. May 2001 23:54, Greg KH wrote:
> On Fri, May 25, 2001 at 09:47:34AM +0200, Alessandro Ronchi wrote:
> > Can i have the corrected file? You can send it to my address, if you
> > don't want to post in the mailing list.
>
> Here it is.  I need to still fix the things in the TODO section, add
> more documentation, and actually test the thing :)

OK, here we go again.

1) in skel_open:

You still increase the module use count after a down(), this is a race.
Either trust the character device code to handle the counts or don't sleep 
before you increase the count.

2) in skel_release:

The sanity check for open_count will leave a semaphore permanently down
in the "goto exit_non_opened" code path

3) in skel_write:

You fail to set the flag for synchronous unlink. Thus all places where you use
'usb_unlink_urb' are race conditions. (a callback pointing into an unloaded 
module could be called)

4) in skel_write_bulk_callback:

You don't check for 'usb_unlink_urb' having been called on the urb. That 
error code does not really refer to an error and should not be reported as 
such.

5) in skel_probe:

The return value of devfs_register is not checked (not very serious)

6) in skel_disconnect:

if (skel->open_count) {

Shouldn't that be !skel->open_count ?
In addition that code path leaves a semaphore permanently down.

        Regards
                Oliver



_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to