Print this page
Running stmfadm remove-hg-member caused a NULL pointer dereference panic in stmf_remove_lu_from_session
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Running stmfadm remove-hg-member caused a NULL pointer dereference panic in stmf_remove_lu_from_session
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
SUP-770 deadlock between thread acquiring iss->iss_lockp in stmf_task_free() and thread holding sl->sl_pgr->pgr_lock from sbd_pgr_remove_it_handle()
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/comstar/stmf/lun_map.c
          +++ new/usr/src/uts/common/io/comstar/stmf/lun_map.c
↓ open down ↓ 39 lines elided ↑ open up ↑
  40   40  
  41   41  #include "stmf_impl.h"
  42   42  #include "lun_map.h"
  43   43  #include "stmf_state.h"
  44   44  
  45   45  void stmf_update_sessions_per_ve(stmf_view_entry_t *ve,
  46   46                  stmf_lu_t *lu, int action);
  47   47  void stmf_add_lus_to_session_per_vemap(stmf_i_local_port_t *ilport,
  48   48                  stmf_i_scsi_session_t *iss, stmf_lun_map_t *vemap);
  49   49  stmf_id_data_t *stmf_lookup_group_for_host(uint8_t *ident, uint16_t ident_size);
  50      -stmf_status_t stmf_add_ent_to_map(stmf_lun_map_t *sm, void *ent, uint8_t *lun);
  51      -stmf_status_t stmf_remove_ent_from_map(stmf_lun_map_t *sm, uint8_t *lun);
       50 +static stmf_status_t stmf_add_ent_to_map(stmf_lun_map_t *sm, void *ent,
       51 +    uint8_t *lun);
       52 +static stmf_status_t stmf_remove_ent_from_map(stmf_lun_map_t *sm, uint8_t *lun);
  52   53  uint16_t stmf_get_next_free_lun(stmf_lun_map_t *sm, uint8_t *lun);
  53   54  stmf_status_t stmf_add_tg(uint8_t *tg_name, uint16_t tg_name_size,
  54   55                  int allow_special, uint32_t *err_detail);
  55   56  stmf_status_t stmf_add_hg(uint8_t *hg_name, uint16_t hg_name_size,
  56   57                  int allow_special, uint32_t *err_detail);
  57   58  stmf_i_local_port_t *stmf_targetident_to_ilport(uint8_t *target_ident,
  58   59                  uint16_t ident_size);
  59   60  stmf_i_scsi_session_t *stmf_lookup_session_for_hostident(
  60   61                  stmf_i_local_port_t *ilport, uint8_t *host_ident,
  61   62                  uint16_t ident_size);
↓ open down ↓ 110 lines elided ↑ open up ↑
 172  173          }
 173  174  
 174  175          for (ilport = stmf_state.stmf_ilportlist; ilport;
 175  176              ilport = ilport->ilport_next) {
 176  177                  ilport->ilport_tg = NULL;
 177  178          }
 178  179  }
 179  180  
 180  181  /*
 181  182   * Create luns map for session based on the view
      183 + * iss_lockp is held
 182  184   */
 183  185  stmf_status_t
 184  186  stmf_session_create_lun_map(stmf_i_local_port_t *ilport,
 185  187                  stmf_i_scsi_session_t *iss)
 186  188  {
 187  189          stmf_id_data_t *tg;
 188  190          stmf_id_data_t *hg;
 189  191          stmf_ver_tg_t   *vertg;
 190  192          char *phg_data, *ptg_data;
 191  193          stmf_ver_hg_t   *verhg;
↓ open down ↓ 37 lines elided ↑ open up ↑
 229  231                  stmf_add_lus_to_session_per_vemap(ilport, iss, ve_map);
 230  232          }
 231  233          /* not configured, cannot access any luns for now */
 232  234  
 233  235          stmf_destroy_ve_map(ve_map);
 234  236  
 235  237          return (STMF_SUCCESS);
 236  238  }
 237  239  
 238  240  /*
 239      - * destroy lun map for session
 240      - */
 241      -/* ARGSUSED */
 242      -stmf_status_t
 243      -stmf_session_destroy_lun_map(stmf_i_local_port_t *ilport,
 244      -                stmf_i_scsi_session_t *iss)
 245      -{
 246      -        stmf_lun_map_t *sm;
 247      -        stmf_i_lu_t *ilu;
 248      -        uint16_t n;
 249      -        stmf_lun_map_ent_t *ent;
 250      -
 251      -        ASSERT(mutex_owned(&stmf_state.stmf_lock));
 252      -        /*
 253      -         * to avoid conflict with updating session's map,
 254      -         * which only grab stmf_lock
 255      -         */
 256      -        sm = iss->iss_sm;
 257      -        iss->iss_sm = NULL;
 258      -        iss->iss_hg = NULL;
 259      -        if (sm->lm_nentries) {
 260      -                for (n = 0; n < sm->lm_nentries; n++) {
 261      -                        if ((ent = (stmf_lun_map_ent_t *)sm->lm_plus[n])
 262      -                            != NULL) {
 263      -                                if (ent->ent_itl_datap) {
 264      -                                        stmf_do_itl_dereg(ent->ent_lu,
 265      -                                            ent->ent_itl_datap,
 266      -                                            STMF_ITL_REASON_IT_NEXUS_LOSS);
 267      -                                }
 268      -                                ilu = (stmf_i_lu_t *)
 269      -                                    ent->ent_lu->lu_stmf_private;
 270      -                                atomic_dec_32(&ilu->ilu_ref_cnt);
 271      -                                kmem_free(sm->lm_plus[n],
 272      -                                    sizeof (stmf_lun_map_ent_t));
 273      -                        }
 274      -                }
 275      -                kmem_free(sm->lm_plus,
 276      -                    sizeof (stmf_lun_map_ent_t *) * sm->lm_nentries);
 277      -        }
 278      -
 279      -        kmem_free(sm, sizeof (*sm));
 280      -        return (STMF_SUCCESS);
 281      -}
 282      -
 283      -/*
 284  241   * Expects the session lock to be held.
      242 + * iss_lockp is held
 285  243   */
 286  244  stmf_xfer_data_t *
 287  245  stmf_session_prepare_report_lun_data(stmf_lun_map_t *sm)
 288  246  {
 289  247          stmf_xfer_data_t *xd;
 290  248          uint16_t nluns, ent;
 291  249          uint32_t alloc_size, data_size;
 292  250          int i;
 293  251  
 294  252          nluns = sm->lm_nluns;
↓ open down ↓ 88 lines elided ↑ open up ↑
 383  341  
 384  342          for (ve = (stmf_view_entry_t *)luid->id_impl_specific;
 385  343              ve; ve = ve->ve_next) {
 386  344                  stmf_update_sessions_per_ve(ve, lu, 0);
 387  345                  if (ilu->ilu_ref_cnt == 0)
 388  346                          break;
 389  347          }
 390  348  }
 391  349  /*
 392  350   * add lu to a session, stmf_lock is already held
      351 + * iss_lockp/ilport_lock already held
 393  352   */
 394      -stmf_status_t
      353 +static stmf_status_t
 395  354  stmf_add_lu_to_session(stmf_i_local_port_t *ilport,
 396  355                  stmf_i_scsi_session_t   *iss,
 397  356                  stmf_lu_t *lu,
 398  357                  uint8_t *lu_nbr)
 399  358  {
 400  359          stmf_lun_map_t *sm = iss->iss_sm;
 401  360          stmf_status_t ret;
 402  361          stmf_i_lu_t *ilu = (stmf_i_lu_t *)lu->lu_stmf_private;
 403  362          stmf_lun_map_ent_t *lun_map_ent;
 404  363          uint32_t new_flags = 0;
↓ open down ↓ 22 lines elided ↑ open up ↑
 427  386           */
 428  387          if (ilport->ilport_standby == 0) {
 429  388                  new_flags |= ISS_LUN_INVENTORY_CHANGED;
 430  389          }
 431  390          atomic_or_32(&iss->iss_flags, new_flags);
 432  391          return (STMF_SUCCESS);
 433  392  }
 434  393  
 435  394  /*
 436  395   * remvoe lu from a session, stmf_lock is already held
      396 + * iss_lockp held
 437  397   */
 438      -/* ARGSUSED */
 439      -stmf_status_t
 440      -stmf_remove_lu_from_session(stmf_i_local_port_t *ilport,
 441      -                stmf_i_scsi_session_t *iss,
 442      -                stmf_lu_t *lu,
 443      -                uint8_t *lu_nbr)
      398 +static void
      399 +stmf_remove_lu_from_session(stmf_i_scsi_session_t *iss,
      400 +    stmf_lu_t *lu, uint8_t *lu_nbr)
 444  401  {
 445  402          stmf_status_t ret;
 446  403          stmf_i_lu_t *ilu;
 447  404          stmf_lun_map_t *sm = iss->iss_sm;
 448  405          stmf_lun_map_ent_t *lun_map_ent;
 449  406          uint16_t luNbr =
 450  407              ((uint16_t)lu_nbr[1] | (((uint16_t)(lu_nbr[0] & 0x3F)) << 8));
 451  408  
 452  409          ASSERT(mutex_owned(&stmf_state.stmf_lock));
 453  410          lun_map_ent = stmf_get_ent_from_map(sm, luNbr);
 454      -        ASSERT(lun_map_ent && lun_map_ent->ent_lu == lu);
      411 +        ASSERT(lun_map_ent->ent_lu == lu);
      412 +        if (lun_map_ent == NULL) {
      413 +                return;
      414 +        }
 455  415  
 456  416          ilu = (stmf_i_lu_t *)lu->lu_stmf_private;
 457  417  
 458  418          ret = stmf_remove_ent_from_map(sm, lu_nbr);
 459  419          ASSERT(ret == STMF_SUCCESS);
 460  420          atomic_dec_32(&ilu->ilu_ref_cnt);
 461  421          iss->iss_flags |= ISS_LUN_INVENTORY_CHANGED;
 462  422          if (lun_map_ent->ent_itl_datap) {
 463  423                  stmf_do_itl_dereg(lu, lun_map_ent->ent_itl_datap,
 464  424                      STMF_ITL_REASON_USER_REQUEST);
 465  425          }
 466  426          kmem_free((void *)lun_map_ent, sizeof (stmf_lun_map_ent_t));
 467      -        return (STMF_SUCCESS);
 468  427  }
 469  428  
 470  429  /*
 471  430   * add or remove lu from all related sessions based on view entry,
 472  431   * action is 0 for delete, 1 for add
 473  432   */
 474  433  void
 475  434  stmf_update_sessions_per_ve(stmf_view_entry_t *ve,
 476  435                  stmf_lu_t *lu, int action)
 477  436  {
↓ open down ↓ 34 lines elided ↑ open up ↑
 512  471                  if (!all_tg && ilport->ilport_tg != ve->ve_tg)
 513  472                          continue;
 514  473                  /* This ilport belongs to the target group */
 515  474                  rw_enter(&ilport->ilport_lock, RW_WRITER);
 516  475                  for (iss = ilport->ilport_ss_list; iss != NULL;
 517  476                      iss = iss->iss_next) {
 518  477                          if (!all_hg && iss->iss_hg != ve->ve_hg)
 519  478                                  continue;
 520  479                          /* This host belongs to the host group */
 521  480                          if (action == 0) { /* to remove */
 522      -                                (void) stmf_remove_lu_from_session(ilport, iss,
 523      -                                    lu_to_add, ve->ve_lun);
      481 +                                stmf_remove_lu_from_session(iss, lu_to_add,
      482 +                                    ve->ve_lun);
 524  483                                  if (ilu_tmp->ilu_ref_cnt == 0) {
 525  484                                          rw_exit(&ilport->ilport_lock);
 526  485                                          return;
 527  486                                  }
 528  487                          } else {
 529  488                                  (void) stmf_add_lu_to_session(ilport, iss,
 530  489                                      lu_to_add, ve->ve_lun);
 531  490                          }
 532  491                  }
 533  492                  rw_exit(&ilport->ilport_lock);
↓ open down ↓ 8 lines elided ↑ open up ↑
 542  501  stmf_add_lus_to_session_per_vemap(stmf_i_local_port_t *ilport,
 543  502                  stmf_i_scsi_session_t *iss,
 544  503                  stmf_lun_map_t *vemap)
 545  504  {
 546  505          stmf_lu_t *lu;
 547  506          stmf_i_lu_t *ilu;
 548  507          stmf_view_entry_t *ve;
 549  508          uint32_t        i;
 550  509  
 551  510          ASSERT(mutex_owned(&stmf_state.stmf_lock));
 552      -
 553  511          for (i = 0; i < vemap->lm_nentries; i++) {
 554  512                  ve = (stmf_view_entry_t *)vemap->lm_plus[i];
 555  513                  if (!ve)
 556  514                          continue;
 557  515                  ilu = (stmf_i_lu_t *)ve->ve_luid->id_pt_to_object;
 558  516                  if (ilu && ilu->ilu_state == STMF_STATE_ONLINE) {
 559  517                          lu = ilu->ilu_lu;
 560  518                          (void) stmf_add_lu_to_session(ilport, iss, lu,
 561  519                              ve->ve_lun);
 562  520                  }
 563  521          }
 564  522  }
 565      -/* remove luns in view entry map from a session */
      523 +/*
      524 + * remove luns in view entry map from a session
      525 + * iss_lockp held
      526 + */
 566  527  void
 567      -stmf_remove_lus_from_session_per_vemap(stmf_i_local_port_t *ilport,
 568      -                stmf_i_scsi_session_t *iss,
 569      -                stmf_lun_map_t *vemap)
      528 +stmf_remove_lus_from_session_per_vemap(stmf_i_scsi_session_t *iss,
      529 +    stmf_lun_map_t *vemap)
 570  530  {
 571  531          stmf_lu_t *lu;
 572  532          stmf_i_lu_t *ilu;
 573  533          stmf_view_entry_t *ve;
 574  534          uint32_t i;
 575  535  
 576  536          ASSERT(mutex_owned(&stmf_state.stmf_lock));
 577  537  
 578  538          for (i = 0; i < vemap->lm_nentries; i++) {
 579  539                  ve = (stmf_view_entry_t *)vemap->lm_plus[i];
 580  540                  if (!ve)
 581  541                          continue;
 582  542                  ilu = (stmf_i_lu_t *)ve->ve_luid->id_pt_to_object;
 583  543                  if (ilu && ilu->ilu_state == STMF_STATE_ONLINE) {
 584  544                          lu = ilu->ilu_lu;
 585      -                        (void) stmf_remove_lu_from_session(ilport, iss, lu,
 586      -                            ve->ve_lun);
      545 +                        stmf_remove_lu_from_session(iss, lu, ve->ve_lun);
 587  546                  }
 588  547          }
 589  548  }
 590  549  
 591  550  stmf_id_data_t *
 592  551  stmf_alloc_id(uint16_t id_size, uint16_t type, uint8_t *id_data,
 593  552                          uint32_t additional_size)
 594  553  {
 595  554          stmf_id_data_t *id;
 596  555          int struct_size, total_size, real_id_size;
↓ open down ↓ 106 lines elided ↑ open up ↑
 703  662          }
 704  663          atomic_dec_32(&idlist->id_count);
 705  664  }
 706  665  
 707  666  
 708  667  /*
 709  668   * The refcnts of objects in a view entry are updated when then entry
 710  669   * is successfully added. ve_map is just another representation of the
 711  670   * view enrtries in a LU. Duplicating or merging a ve map does not
 712  671   * affect any refcnts.
      672 + * stmf_state.stmf_lock held
 713  673   */
 714  674  stmf_lun_map_t *
 715  675  stmf_duplicate_ve_map(stmf_lun_map_t *src)
 716  676  {
 717  677          stmf_lun_map_t *dst;
 718  678          int i;
 719  679  
 720  680          dst = (stmf_lun_map_t *)kmem_zalloc(sizeof (*dst), KM_SLEEP);
 721  681  
 722  682          if (src == NULL)
↓ open down ↓ 12 lines elided ↑ open up ↑
 735  695  
 736  696  void
 737  697  stmf_destroy_ve_map(stmf_lun_map_t *dst)
 738  698  {
 739  699          if (dst->lm_nentries) {
 740  700                  kmem_free(dst->lm_plus, dst->lm_nentries * sizeof (void *));
 741  701          }
 742  702          kmem_free(dst, sizeof (*dst));
 743  703  }
 744  704  
      705 +/*
      706 + * stmf_state.stmf_lock held. Operations are stmf global in nature and
      707 + * not session level.
      708 + */
 745  709  int
 746  710  stmf_merge_ve_map(stmf_lun_map_t *src, stmf_lun_map_t *dst,
 747  711                  stmf_lun_map_t **pp_ret_map, stmf_merge_flags_t mf)
 748  712  {
 749  713          int i;
 750  714          int nentries;
 751  715          int to_create_space = 0;
 752  716  
 753  717          if (dst == NULL) {
 754  718                  *pp_ret_map = stmf_duplicate_ve_map(src);
↓ open down ↓ 304 lines elided ↑ open up ↑
1059 1023          return (STMF_SUCCESS);
1060 1024  add_ve_err_ret:
1061 1025          if (luid_new) {
1062 1026                  if (ilu)
1063 1027                          ilu->ilu_luid = NULL;
1064 1028                  stmf_free_id(luid);
1065 1029          }
1066 1030          return (ret);
1067 1031  }
1068 1032  
1069      -stmf_status_t
     1033 +/*
     1034 + * protected by stmf_state.stmf_lock when working on global lun map.
     1035 + * iss_lockp when working at the session level.
     1036 + */
     1037 +static stmf_status_t
1070 1038  stmf_add_ent_to_map(stmf_lun_map_t *lm, void *ent, uint8_t *lun)
1071 1039  {
1072 1040          uint16_t n;
1073 1041          if (((lun[0] & 0xc0) >> 6) != 0)
1074 1042                  return (STMF_FAILURE);
1075 1043  
1076 1044          n = (uint16_t)lun[1] | (((uint16_t)(lun[0] & 0x3F)) << 8);
1077 1045  try_again_to_add:
1078 1046          if (lm->lm_nentries && (n < lm->lm_nentries)) {
1079 1047                  if (lm->lm_plus[n] == NULL) {
↓ open down ↓ 11 lines elided ↑ open up ↑
1091 1059                  bcopy(lm->lm_plus, pplu,
1092 1060                      lm->lm_nentries * sizeof (void *));
1093 1061                  kmem_free(lm->lm_plus, lm->lm_nentries * sizeof (void *));
1094 1062                  lm->lm_plus = pplu;
1095 1063                  lm->lm_nentries = m;
1096 1064                  goto try_again_to_add;
1097 1065          }
1098 1066  }
1099 1067  
1100 1068  
1101      -stmf_status_t
     1069 +/*
     1070 + * iss_lockp held when working on a session.
     1071 + * stmf_state.stmf_lock is held when working on the global views.
     1072 + */
     1073 +static stmf_status_t
1102 1074  stmf_remove_ent_from_map(stmf_lun_map_t *lm, uint8_t *lun)
1103 1075  {
1104 1076          uint16_t n, i;
1105 1077          uint8_t lutype = (lun[0] & 0xc0) >> 6;
1106 1078          if (lutype != 0)
1107 1079                  return (STMF_FAILURE);
1108 1080  
1109 1081          n = (uint16_t)lun[1] | (((uint16_t)(lun[0] & 0x3F)) << 8);
1110 1082  
1111 1083          if (n >= lm->lm_nentries)
↓ open down ↓ 16 lines elided ↑ open up ↑
1128 1100                  pplu = (void **)kmem_zalloc(m * sizeof (void *), KM_SLEEP);
1129 1101                  bcopy(lm->lm_plus, pplu, m * sizeof (void *));
1130 1102                  kmem_free(lm->lm_plus, lm->lm_nentries * sizeof (void *));
1131 1103                  lm->lm_plus = pplu;
1132 1104                  lm->lm_nentries = m;
1133 1105          }
1134 1106  
1135 1107          return (STMF_SUCCESS);
1136 1108  }
1137 1109  
     1110 +/*
     1111 + * stmf_state.stmf_lock held
     1112 + */
1138 1113  uint16_t
1139 1114  stmf_get_next_free_lun(stmf_lun_map_t *sm, uint8_t *lun)
1140 1115  {
1141 1116          uint16_t luNbr;
1142 1117  
1143 1118  
1144 1119          if (sm->lm_nluns < 0x4000) {
1145 1120                  for (luNbr = 0; luNbr < sm->lm_nentries; luNbr++) {
1146 1121                          if (sm->lm_plus[luNbr] == NULL)
1147 1122                                  break;
↓ open down ↓ 3 lines elided ↑ open up ↑
1151 1126          }
1152 1127          if (lun) {
1153 1128                  bzero(lun, 8);
1154 1129                  lun[1] = luNbr & 0xff;
1155 1130                  lun[0] = (luNbr >> 8) & 0xff;
1156 1131          }
1157 1132  
1158 1133          return (luNbr);
1159 1134  }
1160 1135  
     1136 +/*
     1137 + * stmf_state.stmf_lock is held when working on global view map
     1138 + * iss_lockp (RW_WRITER) is held when working on session map.
     1139 + */
1161 1140  void *
1162 1141  stmf_get_ent_from_map(stmf_lun_map_t *sm, uint16_t lun_num)
1163 1142  {
1164 1143          if ((lun_num & 0xC000) == 0) {
1165 1144                  if (sm->lm_nentries > lun_num)
1166 1145                          return (sm->lm_plus[lun_num & 0x3FFF]);
1167 1146                  else
1168 1147                          return (NULL);
1169 1148          }
1170 1149  
↓ open down ↓ 314 lines elided ↑ open up ↑
1485 1464          for (ilport = stmf_state.stmf_ilportlist; ilport;
1486 1465              ilport = ilport->ilport_next) {
1487 1466                  if (ilport->ilport_state != STMF_STATE_ONLINE)
1488 1467                          continue;
1489 1468                  iss = stmf_lookup_session_for_hostident(ilport,
1490 1469                      entry_ident, entry_size);
1491 1470                  if (iss) {
1492 1471                          stmf_id_data_t *tgid;
1493 1472                          iss->iss_hg = (void *)id_grp;
1494 1473                          tgid = ilport->ilport_tg;
     1474 +                        rw_enter(iss->iss_lockp, RW_WRITER);
1495 1475                          if (tgid) {
1496 1476                                  vemap = stmf_get_ve_map_per_ids(tgid, id_grp);
1497 1477                                  if (vemap)
1498 1478                                          stmf_add_lus_to_session_per_vemap(
1499 1479                                              ilport, iss, vemap);
1500 1480                          }
1501 1481                          if (vemap_alltgt)
1502 1482                                  stmf_add_lus_to_session_per_vemap(ilport,
1503 1483                                      iss, vemap_alltgt);
     1484 +                        rw_exit(iss->iss_lockp);
1504 1485                  }
1505 1486          }
1506 1487  
1507 1488          return (0);
1508 1489  }
1509 1490  
1510 1491  int
1511 1492  stmf_remove_group_member(uint8_t *grpname, uint16_t grpname_size,
1512 1493                  uint8_t *entry_ident, uint16_t entry_size,
1513 1494                  stmf_id_type_t entry_type, uint32_t *err_detail)
↓ open down ↓ 56 lines elided ↑ open up ↑
1570 1551  
1571 1552          /* check if there are session related, if so, update it */
1572 1553          for (ilport = stmf_state.stmf_ilportlist; ilport;
1573 1554              ilport = ilport->ilport_next) {
1574 1555                  if (ilport->ilport_state != STMF_STATE_ONLINE)
1575 1556                          continue;
1576 1557                  iss = stmf_lookup_session_for_hostident(ilport,
1577 1558                      entry_ident, entry_size);
1578 1559                  if (iss) {
1579 1560                          stmf_id_data_t *tgid;
     1561 +                        rw_enter(iss->iss_lockp, RW_WRITER);
1580 1562                          iss->iss_hg = NULL;
1581 1563                          tgid = ilport->ilport_tg;
1582 1564                          if (tgid) {
1583 1565                                  vemap = stmf_get_ve_map_per_ids(tgid, id_grp);
1584 1566                                  if (vemap)
1585 1567                                          stmf_remove_lus_from_session_per_vemap(
1586      -                                            ilport, iss, vemap);
     1568 +                                            iss, vemap);
1587 1569                          }
1588 1570                          if (vemap_alltgt)
1589      -                                stmf_remove_lus_from_session_per_vemap(ilport,
1590      -                                    iss, vemap_alltgt);
     1571 +                                stmf_remove_lus_from_session_per_vemap(iss,
     1572 +                                    vemap_alltgt);
     1573 +                        rw_exit(iss->iss_lockp);
1591 1574                  }
1592 1575          }
1593 1576  
1594 1577          return (0);
1595 1578  }
1596 1579  
1597 1580  /* Assert stmf_lock is already held */
1598 1581  stmf_i_local_port_t *
1599 1582  stmf_targetident_to_ilport(uint8_t *target_ident, uint16_t ident_size)
1600 1583  {
↓ open down ↓ 168 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX