I'll have to have a look at this, but I don't know when. Is there a deadline for this to be done by?
..Stu ----- Original Message ----- From: "Oliver Neukum" <[EMAIL PROTECTED]> To: "Greg KH" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: March 20, 2003 7:43 p Subject: whiteheat - Re: [linux-usb-devel] usb-serial driver audit > > > whiteheat.c > > whiteheat_attach: > > usb_clear_halt(serial->dev, pipe); > ret = usb_bulk_msg (serial->dev, pipe, command, sizeof(command), &alen, COMMAND_TIMEOUT); > DMA on stack > > whiteheat_write: > > result = usb_submit_urb(urb, GFP_ATOMIC); > no need for ATOMIC here > > static void command_port_read_callback: > spin_lock_irqsave(&command_info->lock, flags); > no need to save flags, you are in irq context > > static int firm_send_command: > retval = usb_submit_urb (command_port->write_urb, GFP_KERNEL); > illegal while holding a spinlock, logic looks fishy > > static int start_command_port: > spin_lock_irqsave(&command_info->lock, flags); > if (!command_info->port_running) { > /* Work around HCD bugs */ > usb_clear_halt(serial->dev, command_port->read_urb->pipe); > > command_port->read_urb->dev = serial->dev; > retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); > major brokenness - > A - using usb_clear_halt with a spinlock held is absolutely illegal > B - if you have to submit an URB with a spinlock held, you _must_ use GFP_ATOMIC > > static int start_port_read: > retval = usb_submit_urb(urb, GFP_KERNEL); > use GFP_ATOMIC > > static void stop_command_port (and other places): > spin_lock_irqsave(&command_info->lock, flags); > command_info->port_running--; > if (!command_info->port_running) > usb_unlink_urb(command_port->read_urb); > you must use asynchrnous unlink here. > > HTH > Oliver > > ------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel