2009/8/7 aditya uttam <uttam.aditya@xxxxxxxxx>: > I am a newbie in linux usb development. > > I am allocating some buffer in first thread context using > "usb_buffer_alloc" call. > Where as I am trying to free this memory in a different thread context > using "usb_buffer_free". > With this USB system is getting crashed. > Can any one explain me that Can I free the memory in a thread context, > that has been allocated in a different thread context ?. Yes, you can free the memory in other thread context, but you must make sure the memory allocated by usb_buffer_alloc has not being used by HC any longer (such as, the urb is not on the way), or else crashing your system is very possible. Once you have submitted a urb with the transfer buffer allocated by usb_buffer_alloc and the .complete has not been called, the buffer may be used by HC, you can not free it until .complete is called. Thanks. -- Lei Ming -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html