Jan Klemkow | 1 Dec 2011 18:26
Picon
Favicon

PATCH: failed spl lock release in pgt

Hello,

i have found some incorrect error handling in the pgt driver.
Here is a diff which should patch this.

bye,
Jan Klemkow

Index: pgt.c
===================================================================
RCS file: /mount/cvsdev/cvs/openbsd/src/sys/dev/ic/pgt.c,v
retrieving revision 1.67
diff -u -w -r1.67 pgt.c
--- pgt.c       21 Jun 2011 16:52:45 -0000      1.67
+++ pgt.c       1 Dec 2011 15:53:33 -0000
 <at>  <at>  -2056,14 +2056,14  <at>  <at> 
                     rs_rates[ic->ic_fixed_rate] & IEEE80211_RATE_VAL;
         } else {
                 if (pgt_oid_get(sc, PGT_OID_LINK_STATE, &rate, sizeof(rate)))
-                       return;
+                       goto out;
                 rate = letoh32(rate);
                 if (sc->sc_debug & SC_DEBUG_LINK) {
                         DPRINTF(("%s: %s: link rate %u\n",
                             sc->sc_dev.dv_xname, __func__, rate));
                 }
                 if (rate == 0)
-                       return;
+                       goto out;
         }

         imr->ifm_status = IFM_AVALID;
 <at>  <at>  -2094,6 +2094,7  <at>  <at> 
                 break;
         }

+ out:
         splx(s);
  }


Gmane