Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

[PATCH 4/8] orinoco: orinoco_send_wevents() could return without unlocking.: msg#00042

Subject: [PATCH 4/8] orinoco: orinoco_send_wevents() could return without unlocking.
Signed-off-by: Pavel Roskin <proski-mXXj517/zsQ@xxxxxxxxxxxxxxxx>

orinoco_send_wevents() could return without unlocking.

Failure to read BSSID from the hardware would cause orinoco_send_wevents() to
return with lock held.  Found by sparse.

diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -1112,12 +1112,14 @@ static void orinoco_send_wevents(struct 
        err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID,
                              ETH_ALEN, NULL, wrqu.ap_addr.sa_data);
        if (err != 0)
-               return;
+               goto out;
 
        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
 
        /* Send event to user space */
        wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
+
+ out:
        orinoco_unlock(priv, &flags);
 }
 



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php


<Prev in Thread] Current Thread [Next in Thread>