]> err.no Git - linux-2.6/commitdiff
libertas: fix spinlock recursion bug
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Wed, 19 Mar 2008 14:24:21 +0000 (15:24 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 27 Mar 2008 18:28:30 +0000 (14:28 -0400)
This fixes a bug detected by CONFIG_DEBUG_SPINLOCK:

if_cs_get_int_status() is only called from lbs_thread(), via
priv->hw_get_int_status. However, lbs_thread() has already taken the
priv->driver_lock. So it's a fault to take the same lock again here.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_cs.c

index 5a9cadb97503fbf6ab8b4ba68a18d7da4a5e2ed6..038c66a98f15c4609cc165be05788b926bdea329 100644 (file)
@@ -677,9 +677,7 @@ sbi_get_int_status_exit:
 
        /* Card has a command result for us */
        if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) {
-               spin_lock(&priv->driver_lock);
                ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len);
-               spin_unlock(&priv->driver_lock);
                if (ret < 0)
                        lbs_pr_err("could not receive cmd from card\n");
        }