Hi,
Here's a patch from that fixes the copy_*_user bug that Dawson Engler
found in the generic usb-serial driver. It is against 2.4.3-pre4.
thanks,
greg k-h
--
greg@(kroah|wirex).com
diff -Naur -X dontdiff linux-2.4.3-pre4/drivers/usb/serial/usbserial.c
linux-2.4.3-pre4-greg/drivers/usb/serial/usbserial.c
--- linux-2.4.3-pre4/drivers/usb/serial/usbserial.c Thu Feb 22 23:43:26 2001
+++ linux-2.4.3-pre4-greg/drivers/usb/serial/usbserial.c Mon Mar 19 13:58:28
+2001
@@ -827,14 +827,14 @@
spin_lock_irqsave (&port->port_lock, flags);
count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
- usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
-
if (from_user) {
copy_from_user(port->write_urb->transfer_buffer, buf, count);
}
else {
memcpy (port->write_urb->transfer_buffer, buf, count);
}
+
+ usb_serial_debug_data (__FILE__, __FUNCTION__, count,
+port->write_urb->transfer_buffer);
/* set up our urb */
FILL_BULK_URB(port->write_urb, serial->dev,