* [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()
@ 2013-02-22 13:32 Wei Yongjun
2013-02-22 13:50 ` Arend van Spriel
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-02-22 13:32 UTC (permalink / raw)
To: brudley, arend, meuleman, linville
Cc: yongjun_wei, linux-wireless, brcm80211-dev-list
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing unlock before return from function brcmf_notify_vif_event()
in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index cecc3ef..2af9c0f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -4615,8 +4615,10 @@ static s32 brcmf_notify_vif_event(struct brcmf_if *ifp,
switch (ifevent->action) {
case BRCMF_E_IF_ADD:
/* waiting process may have timed out */
- if (!cfg->vif_event.vif)
+ if (!cfg->vif_event.vif) {
+ mutex_unlock(&event->vif_event_lock);
return -EBADF;
+ }
ifp->vif = vif;
vif->ifp = ifp;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()
2013-02-22 13:32 [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event() Wei Yongjun
@ 2013-02-22 13:50 ` Arend van Spriel
2013-02-25 1:19 ` [PATCH -next v2] " Wei Yongjun
0 siblings, 1 reply; 3+ messages in thread
From: Arend van Spriel @ 2013-02-22 13:50 UTC (permalink / raw)
To: Wei Yongjun
Cc: brudley, meuleman, linville, yongjun_wei, linux-wireless,
brcm80211-dev-list
On 02/22/2013 02:32 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing unlock before return from function brcmf_notify_vif_event()
> in the error handling case.
We have a fix for this one, but not yet submitted. This issue was:
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
If you add that to the commit message, you have my:
Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Regards,
Arend
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH -next v2] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()
2013-02-22 13:50 ` Arend van Spriel
@ 2013-02-25 1:19 ` Wei Yongjun
0 siblings, 0 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-02-25 1:19 UTC (permalink / raw)
To: arend
Cc: brudley, meuleman, linville, yongjun_wei, linux-wireless,
brcm80211-dev-list
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing unlock before return from function brcmf_notify_vif_event()
in the error handling case.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Arend van Spriel <arend@broadcom.com>
---
v1 -> v2: add Reported-by and Acked-by
---
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index cecc3ef..2af9c0f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -4615,8 +4615,10 @@ static s32 brcmf_notify_vif_event(struct brcmf_if *ifp,
switch (ifevent->action) {
case BRCMF_E_IF_ADD:
/* waiting process may have timed out */
- if (!cfg->vif_event.vif)
+ if (!cfg->vif_event.vif) {
+ mutex_unlock(&event->vif_event_lock);
return -EBADF;
+ }
ifp->vif = vif;
vif->ifp = ifp;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-25 1:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 13:32 [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event() Wei Yongjun
2013-02-22 13:50 ` Arend van Spriel
2013-02-25 1:19 ` [PATCH -next v2] " Wei Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).