[gnutls-devel] GnuTLS | priority: rework config reloading logic and locking (!1483)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Nov 5 08:04:06 CET 2021




Daiki Ueno commented on a discussion on lib/priority.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1483#note_724831636

> +	if (system_priority_file_loaded &&
>  	    sb.st_mtime == system_priority_last_mod) {
>  		_gnutls_debug_log("cfg: system priority %s has not changed\n",
>  				  system_priority_file);
>  		goto out;
>  	}
>  
> -	_name_val_array_clear(&system_wide_priority_strings);
> -	system_wide_priority_strings_init = 0;
> +	GNUTLS_STATIC_RWLOCK_UNLOCK(system_wide_config_rwlock);
> +
> +	GNUTLS_STATIC_RWLOCK_WRLOCK(system_wide_config_rwlock);
> +
> +	/* Another thread has updated the system wide config while upgrading to
> +	 * write lock. */
> +	if (system_priority_last_mod >= sb.st_mtime) {

I have no idea what we can do for those cases; suggestions?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1483#note_724831636
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20211105/d5a6f685/attachment-0001.html>


More information about the Gnutls-devel mailing list