Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312827 Details for
Bug 456968
DNA plug-in should use separate locks for each managed range.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
CVS Diffs
diffs.txt (text/plain), 2.77 KB, created by
Nathan Kinder
on 2008-07-28 22:41:06 UTC
(
hide
)
Description:
CVS Diffs
Filename:
MIME Type:
Creator:
Nathan Kinder
Created:
2008-07-28 22:41:06 UTC
Size:
2.77 KB
patch
obsolete
>Index: ldap/servers/plugins/dna/dna.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v >retrieving revision 1.4 >diff -u -5 -t -r1.4 dna.c >--- ldap/servers/plugins/dna/dna.c 23 Jul 2008 16:33:31 -0000 1.4 >+++ ldap/servers/plugins/dna/dna.c 28 Jul 2008 22:11:20 -0000 >@@ -112,24 +112,20 @@ > PRUint64 maxval; > char *filter; > struct slapi_filter *slapi_filter; > char *generate; > char *scope; >+ Slapi_Mutex *new_value_lock; > }; > > static PRCList *dna_global_config = NULL; > static PRRWLock *g_dna_cache_lock; > > static void *_PluginID = NULL; > static char *_PluginDN = NULL; > > >-/* >- * new value lock >- */ >-static Slapi_Mutex *g_new_value_lock; >- > /** > * > * DNA plug-in management functions > * > */ >@@ -330,13 +326,12 @@ > > slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, > "--> dna_start\n"); > > g_dna_cache_lock = PR_NewRWLock(PR_RWLOCK_RANK_NONE, "dna"); >- g_new_value_lock = slapi_new_mutex(); > >- if (!g_dna_cache_lock || !g_new_value_lock) { >+ if (!g_dna_cache_lock) { > slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, > "dna_start: lock creation failed\n"); > > return DNA_FAILURE; > } >@@ -568,13 +563,19 @@ > > slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, > "----------> dnaMaxValue [%ld]\n", value, 0, 0); > > slapi_ch_free_string(&value); >- } else >+ } else { > entry->maxval = -1; >+ } > >+ /* create the new value lock for this range */ >+ entry->new_value_lock = slapi_new_mutex(); >+ if (!entry->new_value_lock) { >+ goto bail; >+ } > > /** > * Finally add the entry to the list > * we group by type then by filter > * and finally sort by dn length with longer dn's >@@ -664,10 +665,13 @@ > slapi_ch_free_string(&e->generate); > > if (e->scope) > slapi_ch_free_string(&e->scope); > >+ if (e->new_value_lock) >+ slapi_destroy_mutex(e->new_value_lock); >+ > slapi_ch_free((void **) entry); > } > > static void deleteConfigEntry(PRCList * entry) > { >@@ -952,11 +956,11 @@ > * to increment the value are detected and avoided - one wins, > * one loses - however, there is no need for the server to compete > * with itself so we lock here > */ > >- slapi_lock_mutex(g_new_value_lock); >+ slapi_lock_mutex(config_entry->new_value_lock); > > for (attempts = 0; attempts < 3; attempts++) { > > LDAPMod mod_add; > LDAPMod mod_delete; >@@ -1102,11 +1106,11 @@ > } > } > > done: > >- slapi_unlock_mutex(g_new_value_lock); >+ slapi_unlock_mutex(config_entry->new_value_lock); > > if (LDAP_SUCCESS != ret) > slapi_ch_free_string(&old_value); > > if (dn)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 456968
: 312827