Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
glibc.33856
nscd-prune.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nscd-prune.patch of Package glibc.33856
From 995db91eb235e6cd68b9bdb41a5b106ed98f9ec5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab <schwab@suse.de> Date: Wed, 17 Jun 2020 16:05:13 +0200 Subject: [PATCH] nscd: bump GC cycle during cache pruning (bug 26130) While nscd prunes a cache it becomes inconsistent temporarily, which is visible to clients if that cache is shared. Bump the GC cycle counter so that the clients notice the modification window. --- nscd/cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) Index: glibc-2.22/nscd/cache.c =================================================================== --- glibc-2.22.orig/nscd/cache.c +++ glibc-2.22/nscd/cache.c @@ -452,6 +452,11 @@ prune_cache (struct database_dyn *table, pthread_rwlock_wrlock (&table->lock); } + /* Now we start modifying the data. Make sure all readers of the + data are aware of this and temporarily don't use the data. */ + ++table->head->gc_cycle; + assert ((table->head->gc_cycle & 1) == 1); + while (first <= last) { if (mark[first]) @@ -492,6 +497,10 @@ prune_cache (struct database_dyn *table, ++first; } + /* Now we are done modifying the data. */ + ++table->head->gc_cycle; + assert ((table->head->gc_cycle & 1) == 0); + /* It's all done. */ pthread_rwlock_unlock (&table->lock);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor