Forget this :-) All my problem came from the usage of a buffer inialized by usb-serial.c that is too small for my module.. So I was writing or reading outside the memory allocation dedicated to the urb structure....
Alain -----Message d'origine----- De : Oliver Neukum [mailto:[EMAIL PROTECTED] Envoyé : dimanche 29 juillet 2007 21:42 À : linux-usb-devel@lists.sourceforge.net Cc : [EMAIL PROTECTED] Objet : Re: [linux-usb-devel] [PATCH] USB Pegasus driver - avoid a potential NULL pointer dereference. Am Sonntag 29 Juli 2007 schrieb [EMAIL PROTECTED]: > I have the same problem in my development.. > > Somewhere in my code: > > unsigned char *data = urb->transfer_buffer ; > .... > if ( data == NULL ) > dbg("%s - data is NULL !!!",__FUNCTION__ ); > > if ( urb->actual_length == 1 && data != NULL ) > len = (int) data[0]; > > > If I don’t do this check in a usb callback function, I have kernel panic > deference to null pointer ! > But the fun stuff in this story is that I never see the debug " data is NULL > !!! " so This never happen if I do this check.... urb->transfer_buffer is set by the caller. Usbcore should never change it. What do you set it to? Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel