Print this page
6938 STMF kstat free is using an improper size for kmem_free().

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/comstar/stmf/stmf.c
          +++ new/usr/src/uts/common/io/comstar/stmf/stmf.c
↓ open down ↓ 3172 lines elided ↑ open up ↑
3173 3173                          ((stmf_id_data_t *)ilu->ilu_luid)->id_pt_to_object =
3174 3174                              NULL;
3175 3175                          ilu->ilu_luid = NULL;
3176 3176                  }
3177 3177                  STMF_EVENT_FREE_HANDLE(ilu->ilu_event_hdl);
3178 3178          } else {
3179 3179                  mutex_exit(&stmf_state.stmf_lock);
3180 3180                  return (STMF_BUSY);
3181 3181          }
3182 3182          if (ilu->ilu_kstat_info) {
3183      -                kmem_free(ilu->ilu_kstat_info->ks_data,
3184      -                    ilu->ilu_kstat_info->ks_data_size);
     3183 +                kmem_free(ilu->ilu_kstat_info->ks_data, STMF_KSTAT_LU_SZ);
3185 3184                  kstat_delete(ilu->ilu_kstat_info);
3186 3185          }
3187 3186          if (ilu->ilu_kstat_io) {
3188 3187                  kstat_delete(ilu->ilu_kstat_io);
3189 3188                  mutex_destroy(&ilu->ilu_kstat_lock);
3190 3189          }
3191 3190          cv_destroy(&ilu->ilu_offline_pending_cv);
3192 3191          mutex_exit(&stmf_state.stmf_lock);
3193 3192          return (STMF_SUCCESS);
3194 3193  }
↓ open down ↓ 157 lines elided ↑ open up ↑
3352 3351                              (lport->lport_pp->pp_stmf_private))->ipp_npps--;
3353 3352                  }
3354 3353                  ilport->ilport_tg = NULL;
3355 3354                  STMF_EVENT_FREE_HANDLE(ilport->ilport_event_hdl);
3356 3355          } else {
3357 3356                  mutex_exit(&stmf_state.stmf_lock);
3358 3357                  return (STMF_BUSY);
3359 3358          }
3360 3359          if (ilport->ilport_kstat_info) {
3361 3360                  kmem_free(ilport->ilport_kstat_info->ks_data,
3362      -                    ilport->ilport_kstat_info->ks_data_size);
     3361 +                    STMF_KSTAT_TGT_SZ);
3363 3362                  kstat_delete(ilport->ilport_kstat_info);
3364 3363          }
3365 3364          if (ilport->ilport_kstat_io) {
3366 3365                  kstat_delete(ilport->ilport_kstat_io);
3367 3366                  mutex_destroy(&ilport->ilport_kstat_lock);
3368 3367          }
3369 3368          mutex_exit(&stmf_state.stmf_lock);
3370 3369          return (STMF_SUCCESS);
3371 3370  }
3372 3371  
↓ open down ↓ 4619 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX