Mercurial > illumos > illumos-gate
changeset 13344:7691b36f7461
915 ill_taskq_dispatch() race condition
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Albert Lee <trisk@opensolaris.org>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
author | Bryan Cantrill <bryancantrill@gmail.com> |
---|---|
date | Thu, 21 Apr 2011 20:06:36 -0400 |
parents | 62db0cff8d6f |
children | 20c193a013b8 |
files | usr/src/uts/common/inet/ip/ip.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/inet/ip/ip.c Thu Apr 21 09:14:24 2011 -0700 +++ b/usr/src/uts/common/inet/ip/ip.c Thu Apr 21 20:06:36 2011 -0400 @@ -22,6 +22,7 @@ /* * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1990 Mentat Inc. + * Copyright (c) 2011 Joyent, Inc. All rights reserved. */ #include <sys/types.h> @@ -4646,10 +4647,10 @@ /* * Create the taskq dispatcher thread and initialize related stuff. */ + mutex_init(&ipst->ips_capab_taskq_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&ipst->ips_capab_taskq_cv, NULL, CV_DEFAULT, NULL); ipst->ips_capab_taskq_thread = thread_create(NULL, 0, ill_taskq_dispatch, ipst, 0, &p0, TS_RUN, minclsyspri); - mutex_init(&ipst->ips_capab_taskq_lock, NULL, MUTEX_DEFAULT, NULL); - cv_init(&ipst->ips_capab_taskq_cv, NULL, CV_DEFAULT, NULL); major = mod_name_to_major(INET_NAME); (void) ldi_ident_from_major(major, &ipst->ips_ldi_ident);