This is a trivial fix for this oops; there might
be a better one.

- Dave
This prevents the serial gadget driver from oopsing during enumeration
when spinlocks are configured, and slab poisoning is active...

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

--- 1.21/drivers/usb/gadget/serial.c	2004-11-23 11:29:55 -08:00
+++ edited/drivers/usb/gadget/serial.c	2005-01-06 12:29:34 -08:00
@@ -2322,11 +2322,11 @@
 					wake_up_interruptible(&port->port_tty->read_wait);
 					wake_up_interruptible(&port->port_tty->write_wait);
 				}
+				spin_unlock_irqrestore(&port->port_lock, flags);
 			} else {
 				kfree(port);
 			}
 
-			spin_unlock_irqrestore(&port->port_lock, flags);
 		}
 	}
 }

Reply via email to