diff options
author | DJ Delorie <dj@redhat.com> | 2017-09-25 19:43:09 -0400 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2017-09-25 19:49:36 -0400 |
commit | 3de93d194a5d27cabfe40ddf58aea36939498ba4 (patch) | |
tree | 6fbd102829448ed8091cc7788d89a9f11f71e801 | |
parent | 5af1e931bfaf8ef28abd94c0c0ad14e4790cf429 (diff) | |
download | glibc-3de93d194a5d27cabfe40ddf58aea36939498ba4.tar.gz glibc-3de93d194a5d27cabfe40ddf58aea36939498ba4.tar.xz glibc-3de93d194a5d27cabfe40ddf58aea36939498ba4.zip |
nscd: Release read lock after resetting timeout.
[BZ #22161] * nscd/netgroupcache.c (addinnetgrX): Release read lock after resetting timeout. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Reviewed-by: Andreas Schwab <schwab@suse.de> A lock is held by mempool_allocate() when CACHEABLE is true; we must release this lock if we exit early.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | nscd/netgroupcache.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 86cd508e3c..dddda15323 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-09-25 DJ Delorie <dj@redhat.com> + + [BZ #22161] + * nscd/netgroupcache.c (addinnetgrX): Release read lock after + resetting timeout. + 2017-09-25 Stefan Liebler <stli@linux.vnet.ibm.com> * sysdeps/ieee754/dbl-64/sincos32.h diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index cd0c3ea19b..3ca96f8205 100644 --- a/nscd/netgroupcache.c +++ b/nscd/netgroupcache.c @@ -584,6 +584,8 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, dh->timeout = timeout; dh->ttl = dataset->head.ttl; ++dh->nreloads; + if (cacheable) + pthread_rwlock_unlock (&db->lock); return timeout; } |