File netgroupcache-locking.patch of Package glibc.33856

2017-09-25  DJ Delorie  <dj@redhat.com>

	[BZ #22161]
	* nscd/netgroupcache.c (addinnetgrX): Release read lock after
	resetting timeout.

Index: glibc-2.22/nscd/netgroupcache.c
===================================================================
--- glibc-2.22.orig/nscd/netgroupcache.c
+++ glibc-2.22/nscd/netgroupcache.c
@@ -584,6 +584,8 @@ addinnetgrX (struct database_dyn *db, in
       dh->timeout = timeout;
       dh->ttl = dataset->head.ttl;
       ++dh->nreloads;
+      if (cacheable)
+	pthread_rwlock_unlock (&db->lock);
       return timeout;
     }
 
openSUSE Build Service is sponsored by