diff options
author | jwadams <none@none> | 2005-10-05 17:24:43 -0700 |
---|---|---|
committer | jwadams <none@none> | 2005-10-05 17:24:43 -0700 |
commit | 1c326e9416070828d0deab52d9d27f7fd27aef7a (patch) | |
tree | 89ed3125218a312fa9d3d55b12ca3a857aa64742 /usr/src/lib/libumem/common/umem.c | |
parent | e067707b65c63939ade45e268f2b0dff6f65f75d (diff) | |
download | illumos-gate-1c326e9416070828d0deab52d9d27f7fd27aef7a.tar.gz |
6308756 fork and umem_update_thread may become in deadlock condition.
Diffstat (limited to 'usr/src/lib/libumem/common/umem.c')
-rw-r--r-- | usr/src/lib/libumem/common/umem.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/usr/src/lib/libumem/common/umem.c b/usr/src/lib/libumem/common/umem.c index 725d4add40..6f2304390f 100644 --- a/usr/src/lib/libumem/common/umem.c +++ b/usr/src/lib/libumem/common/umem.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -55,6 +55,7 @@ * * * KM_SLEEP v.s. UMEM_NOFAIL * + * * lock ordering * * 2. Initialization * ----------------- @@ -329,6 +330,31 @@ * If a constructor callback _does_ do a UMEM_NOFAIL allocation, and * the nofail callback does a non-local exit, we will leak the * partially-constructed buffer. + * + * + * 6. Lock Ordering + * ---------------- + * umem has a few more locks than kmem does, mostly in the update path. The + * overall lock ordering (earlier locks must be acquired first) is: + * + * umem_init_lock + * + * vmem_list_lock + * vmem_nosleep_lock.vmpl_mutex + * vmem_t's: + * vm_lock + * sbrk_faillock + * + * umem_cache_lock + * umem_update_lock + * umem_flags_lock + * umem_cache_t's: + * cache_cpu[*].cc_lock + * cache_depot_lock + * cache_lock + * umem_log_header_t's: + * lh_cpu[*].clh_lock + * lh_lock */ #include "mtlib.h" |