⬢ DragonFlyBSD Kernel Audit
DF-5674 / fix.diff
← back to finding ↓ download raw
--- sys/libprop/prop_dictionary.c	2026-06-29 12:51:19.000000000 +0000
+++ /tmp/opencode/prop/pfix_dictionary.c	2026-10-09 20:45:56.612184101 +0000
@@ -150,6 +150,8 @@
 	.pot_free	=	_prop_dict_keysym_free,
 	.pot_extern	=	_prop_dict_keysym_externalize,
 	.pot_equals	=	_prop_dict_keysym_equals,
+	.pot_lock	=	_prop_dictionary_lock,
+	.pot_unlock	=	_prop_dictionary_unlock,
 };
 
 #define	prop_object_is_dictionary(x)		\
--- sys/libprop/prop_object_impl.h	2026-06-29 12:51:19.000000000 +0000
+++ /tmp/opencode/prop/pfix_object_impl.h	2026-10-09 20:46:18.523899768 +0000
@@ -414,7 +414,13 @@
  */
 #include <pthread.h>
 #define	_PROP_MUTEX_DECL_STATIC(x)	static pthread_mutex_t x;
-#define	_PROP_MUTEX_INIT(x)		pthread_mutex_init(&(x), NULL)
+#define	_PROP_MUTEX_INIT(x)		do {						\
+		pthread_mutexattr_t _pma;				\
+		pthread_mutexattr_init(&_pma);				\
+		pthread_mutexattr_settype(&_pma, PTHREAD_MUTEX_RECURSIVE);	\
+		pthread_mutex_init(&(x), &_pma);				\
+		pthread_mutexattr_destroy(&_pma);				\
+	} while (0)
 #define	_PROP_MUTEX_LOCK(x)		pthread_mutex_lock(&(x))
 #define	_PROP_MUTEX_UNLOCK(x)		pthread_mutex_unlock(&(x))