]> git.neil.brown.name Git - history.git/commitdiff
[ATM]: Fix possible unlock of a non-locked lock in HE driver.
authorChas Williams <chas@cmf.nrl.navy.mil>
Wed, 18 Jun 2003 11:08:28 +0000 (04:08 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 18 Jun 2003 11:08:28 +0000 (04:08 -0700)
drivers/atm/he.c

index 2bacc8f75e1c0c1b336017dbc6a1e7e012024f19..407748d0c4c69b856bea40c6ac296e2c0b849a8c 100644 (file)
@@ -2710,12 +2710,13 @@ he_close(struct atm_vcc *vcc)
                remove_wait_queue(&he_vcc->tx_waitq, &wait);
                set_current_state(TASK_RUNNING);
 
+               spin_lock_irqsave(&he_dev->global_lock, flags);
+
                if (timeout == 0) {
                        hprintk("close tx timeout cid 0x%x\n", cid);
                        goto close_tx_incomplete;
                }
 
-               spin_lock_irqsave(&he_dev->global_lock, flags);
                while (!((tsr4 = he_readl_tsr4(he_dev, cid)) & TSR4_SESSION_ENDED)) {
                        HPRINTK("close tx cid 0x%x !TSR4_SESSION_ENDED (tsr4 = 0x%x)\n", cid, tsr4);
                        udelay(250);