Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/net80211/net80211_crypto_tkip.c
          +++ new/usr/src/uts/common/io/net80211/net80211_crypto_tkip.c
↓ open down ↓ 96 lines elided ↑ open up ↑
  97   97  extern int rc4_crypt(crypto_context_t, const uint8_t *, uint8_t *, int);
  98   98  extern int rc4_final(crypto_context_t, uint8_t *, int);
  99   99  
 100  100  /* ARGSUSED */
 101  101  static void *
 102  102  tkip_attach(struct ieee80211com *ic, struct ieee80211_key *k)
 103  103  {
 104  104          struct tkip_ctx *ctx;
 105  105  
 106  106          ctx = kmem_zalloc(sizeof (struct tkip_ctx), KM_SLEEP);
 107      -        if (ctx == NULL)
 108      -                return (NULL);
 109  107  
 110  108          ctx->tc_ic = ic;
 111  109          return (ctx);
 112  110  }
 113  111  
 114  112  static void
 115  113  tkip_detach(struct ieee80211_key *k)
 116  114  {
 117  115          struct tkip_ctx *ctx = k->wk_private;
 118  116  
↓ open down ↓ 660 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX