]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
usb-serial: possible irq lock inversion (PPP vs. usb/serial)
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 25 Sep 2006 10:51:41 +0000 (12:51 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Sep 2006 22:36:43 +0000 (15:36 -0700)
=========================================================
[ INFO: possible irq lock inversion dependency detected ]

drivers/usb/serial/cyberjack.c
drivers/usb/serial/generic.c
drivers/usb/serial/ipw.c
drivers/usb/serial/ir-usb.c
drivers/usb/serial/keyspan_pda.c
drivers/usb/serial/omninet.c
drivers/usb/serial/safe_serial.c

index 6286aba86fae2340beaed87c5f2a970050053939..d954ec34b018504b0cde6706030e3a29fac46ea9 100644 (file)
@@ -214,14 +214,14 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
                return (0);
        }
 
-       spin_lock(&port->lock);
+       spin_lock_bh(&port->lock);
        if (port->write_urb_busy) {
-               spin_unlock(&port->lock);
+               spin_unlock_bh(&port->lock);
                dbg("%s - already writing", __FUNCTION__);
                return 0;
        }
        port->write_urb_busy = 1;
-       spin_unlock(&port->lock);
+       spin_unlock_bh(&port->lock);
 
        spin_lock_irqsave(&priv->lock, flags);
 
index 17271355639397be219a44c2e3c4fe75f13bd7f2..21cbaa0fb96b998e99084ac3bc3ed6db1ac2f3dc 100644 (file)
@@ -175,14 +175,14 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
 
        /* only do something if we have a bulk out endpoint */
        if (serial->num_bulk_out) {
-               spin_lock(&port->lock);
+               spin_lock_bh(&port->lock);
                if (port->write_urb_busy) {
-                       spin_unlock(&port->lock);
+                       spin_unlock_bh(&port->lock);
                        dbg("%s - already writing", __FUNCTION__);
                        return 0;
                }
                port->write_urb_busy = 1;
-               spin_unlock(&port->lock);
+               spin_unlock_bh(&port->lock);
 
                count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
 
index 87306cb6f9f5a065c6ead79b10e60b77b76a6f2a..812bc213a963349643b0e974cdf8b47629b57fef 100644 (file)
@@ -394,14 +394,14 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
                return 0;
        }
 
-       spin_lock(&port->lock);
+       spin_lock_bh(&port->lock);
        if (port->write_urb_busy) {
-               spin_unlock(&port->lock);
+               spin_unlock_bh(&port->lock);
                dbg("%s - already writing", __FUNCTION__);
                return 0;
        }
        port->write_urb_busy = 1;
-       spin_unlock(&port->lock);
+       spin_unlock_bh(&port->lock);
 
        count = min(count, port->bulk_out_size);
        memcpy(port->bulk_out_buffer, buf, count);
index 1738b0b6a376dd90e41a1fadf8a3486eff6f0fac..1b348df388ed2586a2ce0937c3f4af9e3b61c934 100644 (file)
@@ -342,14 +342,14 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
        if (count == 0)
                return 0;
 
-       spin_lock(&port->lock);
+       spin_lock_bh(&port->lock);
        if (port->write_urb_busy) {
-               spin_unlock(&port->lock);
+               spin_unlock_bh(&port->lock);
                dbg("%s - already writing", __FUNCTION__);
                return 0;
        }
        port->write_urb_busy = 1;
-       spin_unlock(&port->lock);
+       spin_unlock_bh(&port->lock);
 
        transfer_buffer = port->write_urb->transfer_buffer;
        transfer_size = min(count, port->bulk_out_size - 1);
index 49b8dc039d1fef8f68aca71fee6efdb02082f458..59e777f1e8fdd3502eafab416be7d84bdc15d7ee 100644 (file)
@@ -518,13 +518,13 @@ static int keyspan_pda_write(struct usb_serial_port *port,
           the TX urb is in-flight (wait until it completes)
           the device is full (wait until it says there is room)
        */
-       spin_lock(&port->lock);
+       spin_lock_bh(&port->lock);
        if (port->write_urb_busy || priv->tx_throttled) {
-               spin_unlock(&port->lock);
+               spin_unlock_bh(&port->lock);
                return 0;
        }
        port->write_urb_busy = 1;
-       spin_unlock(&port->lock);
+       spin_unlock_bh(&port->lock);
 
        /* At this point the URB is in our control, nobody else can submit it
           again (the only sudden transition was the one from EINPROGRESS to
index e49f40913c27550e0c121c8d01bdf8ef909d0ae7..a764ff4e326cfb2c6695af4e226b9389a3a5e866 100644 (file)
@@ -256,14 +256,14 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
                return (0);
        }
 
-       spin_lock(&wport->lock);
+       spin_lock_bh(&wport->lock);
        if (wport->write_urb_busy) {
-               spin_unlock(&wport->lock);
+               spin_unlock_bh(&wport->lock);
                dbg("%s - already writing", __FUNCTION__);
                return 0;
        }
        wport->write_urb_busy = 1;
-       spin_unlock(&wport->lock);
+       spin_unlock_bh(&wport->lock);
 
        count = (count > OMNINET_BULKOUTSIZE) ? OMNINET_BULKOUTSIZE : count;
 
index 789771ecdb11013a168ffc5fa0157474ab4538dc..1e07dfad68535b54a80a8860f9fc8b71e1f6f615 100644 (file)
@@ -298,14 +298,14 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
                dbg ("%s - write request of 0 bytes", __FUNCTION__);
                return (0);
        }
-       spin_lock(&port->lock);
+       spin_lock_bh(&port->lock);
        if (port->write_urb_busy) {
-               spin_unlock(&port->lock);
+               spin_unlock_bh(&port->lock);
                dbg("%s - already writing", __FUNCTION__);
                return 0;
        }
        port->write_urb_busy = 1;
-       spin_unlock(&port->lock);
+       spin_unlock_bh(&port->lock);
 
        packet_length = port->bulk_out_size;    // get max packetsize