diff options
| author | haad <haad@NetBSD.org> | 2008-11-30 00:17:07 +0000 |
|---|---|---|
| committer | haad <haad@NetBSD.org> | 2008-11-30 00:17:07 +0000 |
| commit | e51aea320a2f8f7d3ee4cf3a514b763e1afe7d98 (patch) | |
| tree | 9ae94e778dfea49f2ec1f8c6293f2737b4ed7113 /common/lib/libprop/prop_object_impl.h | |
| parent | 82b58f55f09a1f72110cce8384381003ddfe82ca (diff) | |
Fix two race conditions in proplib library. In prop_dictionary and prop_number
there was small window in which was entry left in rb tree with reference
count 0 which lead to rb tree coruption when another thread picked this up
before it was released.
Add 2 new members to the prop_object_t which are used for locking/unlocking
rb tree guard mutex.
Ok by joerg@, core@, thorpej@
Diffstat (limited to 'common/lib/libprop/prop_object_impl.h')
| -rw-r--r-- | common/lib/libprop/prop_object_impl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/lib/libprop/prop_object_impl.h b/common/lib/libprop/prop_object_impl.h index 8190b26df0f..d58ec4a3a29 100644 --- a/common/lib/libprop/prop_object_impl.h +++ b/common/lib/libprop/prop_object_impl.h @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object_impl.h,v 1.27 2008/08/03 04:00:12 thorpej Exp $ */ +/* $NetBSD: prop_object_impl.h,v 1.28 2008/11/30 00:17:07 haad Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -211,6 +211,8 @@ struct _prop_object_type { * _PROP_OBJECT_EQUALS_RECURSE */ void (*pot_equals_finish)(prop_object_t, prop_object_t); + void (*pot_lock)(void); + void (*pot_unlock)(void); }; struct _prop_object { |
