From: "Franky Lin" <frankyl@broadcom.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: brcm80211: fmac: fix missing completion events issue
Date: Mon, 30 Apr 2012 09:53:53 -0700 [thread overview]
Message-ID: <4F9EC3A1.2070001@broadcom.com> (raw)
In-Reply-To: <20120430112219.GA23246@elgon.mountain>
On 04/30/2012 04:22 AM, Dan Carpenter wrote:
> Hello Franky Lin,
>
> The patch b948a85c1f26: "brcm80211: fmac: fix missing completion
> events issue" from Apr 23, 2012, leads to the following Smatch warning:
> drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c:2650
> brcmf_sdbrcm_dpc_thread()
> error: double unlock 'spin_lock:&bus->dpc_tl_lock'
>
>
> 2631
> 2632 spin_lock_irqsave(&bus->dpc_tl_lock, flags);
> 2633 list_for_each_safe(cur_hd, tmp_hd,&bus->dpc_tsklst) {
> 2634 spin_unlock_irqrestore(&bus->dpc_tl_lock, flags);
> 2635
> 2636 if (bus->sdiodev->bus_if->state == BRCMF_BUS_DOWN) {
> 2637 /* after stopping the bus, exit thread */
> 2638 brcmf_sdbrcm_bus_stop(bus->sdiodev->dev);
> 2639 bus->dpc_tsk = NULL;
> 2640 break;
> ^^^^^^
> We are not holding the lock here.
>
> 2641 }
> 2642
> 2643 if (brcmf_sdbrcm_dpc(bus))
> 2644 brcmf_sdbrcm_adddpctsk(bus);
> 2645
> 2646 spin_lock_irqsave(&bus->dpc_tl_lock, flags);
> 2647 list_del(cur_hd);
> 2648 kfree(cur_hd);
> 2649 }
> 2650 spin_unlock_irqrestore(&bus->dpc_tl_lock, flags);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Double unlock. Double IRQ restore.
Hi Dan,
Thx for catching this. Working on a fix.
Regards,
Franky
prev parent reply other threads:[~2012-04-30 16:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 11:22 brcm80211: fmac: fix missing completion events issue Dan Carpenter
2012-04-30 16:53 ` Franky Lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F9EC3A1.2070001@broadcom.com \
--to=frankyl@broadcom.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.