Print this page
re #8564, rb4224 "mutex_enter: bad mutex" panic when under heavy load

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/comstar/port/pppt/pppt.c
          +++ new/usr/src/uts/common/io/comstar/port/pppt/pppt.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
       21 +
  21   22  /*
  22   23   * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  23   24   * Copyright 2013, Nexenta Systems, Inc. All rights reserved.
  24   25   */
  25   26  
  26   27  #include <sys/cpuvar.h>
  27   28  #include <sys/types.h>
  28   29  #include <sys/conf.h>
  29   30  #include <sys/stat.h>
  30   31  #include <sys/file.h>
↓ open down ↓ 1210 lines elided ↑ open up ↑
1241 1242  pppt_task_start(pppt_task_t *ptask)
1242 1243  {
1243 1244          avl_index_t             where;
1244 1245  
1245 1246          ASSERT(ptask->pt_state == PTS_INIT);
1246 1247  
1247 1248          mutex_enter(&ptask->pt_sess->ps_mutex);
1248 1249          mutex_enter(&ptask->pt_mutex);
1249 1250          if (avl_find(&ptask->pt_sess->ps_task_list, ptask, &where) == NULL) {
1250 1251                  pppt_task_update_state(ptask, PTS_ACTIVE);
1251      -                /* Manually increment refcnt, sincd we hold the mutex... */
     1252 +                /* Manually increment refcnt, since we hold the mutex... */
1252 1253                  ptask->pt_refcnt++;
1253 1254                  avl_insert(&ptask->pt_sess->ps_task_list, ptask, where);
1254 1255                  mutex_exit(&ptask->pt_mutex);
1255 1256                  mutex_exit(&ptask->pt_sess->ps_mutex);
1256 1257                  return (PPPT_STATUS_SUCCESS);
1257 1258          }
1258 1259          mutex_exit(&ptask->pt_mutex);
1259 1260          mutex_exit(&ptask->pt_sess->ps_mutex);
1260 1261  
1261 1262          return (PPPT_STATUS_FAIL);
↓ open down ↓ 191 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX