From: Oliver Neukum Date: Tue, 22 Jan 2008 12:56:18 +0000 (+0100) Subject: USB: more serial drivers writing after disconnect X-Git-Tag: v2.6.25-rc1~1075^2~20 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95bef012ea4a3cce437a4fcf59bb097d14944b0d;p=pandora-kernel.git USB: more serial drivers writing after disconnect this covers the rest of the obvious cases by using the flags and locks to guard against disconnect which were introduced in the earlier patch against mos7720. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 77bb893bf2e9..f156dba0300f 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c @@ -217,7 +217,10 @@ static void airprime_close(struct usb_serial_port *port, struct file * filp) priv->rts_state = 0; priv->dtr_state = 0; - airprime_send_setup(port); + mutex_lock(&port->serial->disc_mutex); + if (!port->serial->disconnected) + airprime_send_setup(port); + mutex_lock(&port->serial->disc_mutex); for (i = 0; i < NUM_READ_URBS; ++i) { usb_kill_urb (priv->read_urbp[i]); Reading git-diff-tree failed