> Any reason you don't submit this driver for inclusion in the main kernel
> trees?
Yes, the w9968cf module depends on the ovcamchip module, which is not ready yet to be
included in linux 2.5. It is a matter of few days.
---------------------------------
Are you kidding or what ? :
> It should get some fixes first:
> 1. static int w9968cf_allocate_memory(struct w9968cf_device* cam)
> leaking memory in the error case
> 2. static int
> w9968cf_proc_read_main(char* page, char** start, off_t offset,
int count, int* eof, void* data)
> This line:
> for (ptr = list->next; ptr != list; ptr = ptr->next, ncams++);
> Needs to hold a lock for list traversal. As does the next run in the same
> function.
> 3. w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs)
> The handling of wait queues looks quite fishy.
> In particular, it looks racy and how do you know that there's
> just one active queue?
> 4. static int
> w9968cf_start_transfer(struct w9968cf_device* cam)
> Here:
> err = usb_submit_urb(urb, GFP_KERNEL);
> Race condition. It must come last or you race with the completion handler.
> 5. static int w9968cf_stop_transfer(struct w9968cf_device* cam)
> Sleeping with a spinlock held
Few words:
I am sorry to say that you didn't understand _anything_ about the code, I would
suggest you to read the code _again_. Above all, IMHO the design is much simpler than
other drivers and very efficient when holding spinlocks (At least, Mr. Alan Cox had a
look at the _previous_ and already stable version of the driver and approved it (V4l
mailing list for more details)).
I would never write a driver where the code goes sleeping with a spinlock held, LOL
Also, memory management is ok.
Oh..Ok, I will fix the case 3, to avoid accessing the camera data structure while the
device is being detached (i hope you meant that and _only_ that).
Anyway, THANK you for the help. :-)
Luca Risolia
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel