Re: [PATCH][ATM] assorted he driver cleanup

Francois Romieu (romieu@fr.zoreil.com)
Mon, 2 Jun 2003 00:42:32 +0200


An unconditional HE_SPIN_UNLOCK(he_dev, flags); stands behind the
'close_tx_incomplete' label in he_close(). The following patch should cure
a possible unlock of a non-locked lock (courtesy of kbugs.org, see
http://kbugs.org/cgi-bin/index.py?page=source&version=2.5.70&file=drivers/atm/he.c#line2840).

--- linux-2.5.70-1.1229.7.33-to-1.1330/drivers/atm/he.c Mon Jun 2 00:33:38 2003
+++ linux-2.5.70-1.1229.7.33-to-1.1330/drivers/atm/he.c Mon Jun 2 00:34:29 2003
@@ -2731,12 +2731,13 @@ he_close(struct atm_vcc *vcc)
remove_wait_queue(&he_vcc->tx_waitq, &wait);
set_current_state(TASK_RUNNING);

+ HE_SPIN_LOCK(he_dev, flags);
+
if (timeout == 0) {
hprintk("close tx timeout cid 0x%x\n", cid);
goto close_tx_incomplete;
}

- HE_SPIN_LOCK(he_dev, 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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/