Print this page
915 ill_taskq_dispatch() race condition
        (originally Joyent OS-119 panic from mutex_vector_exit)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ip.c
          +++ new/usr/src/uts/common/inet/ip/ip.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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   23   * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright (c) 1990 Mentat Inc.
       25 + * Copyright (c) 2011 Joyent, Inc. All rights reserved.
  25   26   */
  26   27  
  27   28  #include <sys/types.h>
  28   29  #include <sys/stream.h>
  29   30  #include <sys/dlpi.h>
  30   31  #include <sys/stropts.h>
  31   32  #include <sys/sysmacros.h>
  32   33  #include <sys/strsubr.h>
  33   34  #include <sys/strlog.h>
  34   35  #include <sys/strsun.h>
↓ open down ↓ 4604 lines elided ↑ open up ↑
4639 4640          ip_net_init(ipst, ns);
4640 4641          ipv4_hook_init(ipst);
4641 4642          ipv6_hook_init(ipst);
4642 4643          arp_hook_init(ipst);
4643 4644          ipmp_init(ipst);
4644 4645          ipobs_init(ipst);
4645 4646  
4646 4647          /*
4647 4648           * Create the taskq dispatcher thread and initialize related stuff.
4648 4649           */
4649      -        ipst->ips_capab_taskq_thread = thread_create(NULL, 0,
4650      -            ill_taskq_dispatch, ipst, 0, &p0, TS_RUN, minclsyspri);
4651 4650          mutex_init(&ipst->ips_capab_taskq_lock, NULL, MUTEX_DEFAULT, NULL);
4652 4651          cv_init(&ipst->ips_capab_taskq_cv, NULL, CV_DEFAULT, NULL);
     4652 +        ipst->ips_capab_taskq_thread = thread_create(NULL, 0,
     4653 +            ill_taskq_dispatch, ipst, 0, &p0, TS_RUN, minclsyspri);
4653 4654  
4654 4655          major = mod_name_to_major(INET_NAME);
4655 4656          (void) ldi_ident_from_major(major, &ipst->ips_ldi_ident);
4656 4657          return (ipst);
4657 4658  }
4658 4659  
4659 4660  /*
4660 4661   * Allocate and initialize a DLPI template of the specified length.  (May be
4661 4662   * called as writer.)
4662 4663   */
↓ open down ↓ 10596 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX