]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* nscd/connections.c (sighup_pending): New variable.
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 17:33:56 +0000 (17:33 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 17:33:56 +0000 (17:33 +0000)
(nscd_run): If sighup_pending, prune all 3 caches.
(sighup_handler): Don't prune caches here, rather just set
sighup_pending flag.

ChangeLog
fedora/glibc-nptl-check.patch [deleted file]
fedora/glibc-ppc-assume.patch [deleted file]
fedora/glibc.spec.in
nscd/connections.c

index fbf5f1be2da2efa1a17488b1b66a43804dd60faa..4479b7b95112b1c5126cabf52b3f1366597fa5f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-07-02  Jakub Jelinek  <jakub@redhat.com>
+
+       * nscd/connections.c (sighup_pending): New variable.
+       (nscd_run): If sighup_pending, prune all 3 caches.
+       (sighup_handler): Don't prune caches here, rather just set
+       sighup_pending flag.
+
 2007-07-03  Jakub Jelinek  <jakub@redhat.com>
 
        [BZ #4702]
diff --git a/fedora/glibc-nptl-check.patch b/fedora/glibc-nptl-check.patch
deleted file mode 100644 (file)
index 48951ea..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---- libc/sysdeps/unix/sysv/linux/dl-osinfo.h.jj        2002-12-10 09:09:24.000000000 -0500
-+++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h   2003-05-20 17:05:37.000000000 -0400
-@@ -22,6 +22,7 @@
- #include <sys/sysctl.h>
- #include <sys/utsname.h>
- #include "kernel-features.h"
-+#include <sysdep.h>
- #ifndef MIN
- # define MIN(a,b) (((a)<(b))?(a):(b))
-@@ -37,8 +38,29 @@ dl_fatal (const char *str)
-   _dl_dprintf (2, str);
-   _exit (1);
- }
--#endif
-+static inline void
-+__attribute__ ((always_inline))
-+dl_redhat_nptl_check (const char *cp)
-+{
-+  cp = strchr (cp, 'n');
-+  if (__builtin_expect (cp == NULL || cp[1] != 'p'
-+                      || cp[2] != 't' || cp[3] != 'l', 0)
-+      && GLRO(dl_osversion) < 0x20545
-+      && GLRO(dl_osversion) > 0x20413)
-+    {
-+#ifdef __NR_set_tid_address
-+      INTERNAL_SYSCALL_DECL (err);
-+      int ret;
-+      ret = INTERNAL_SYSCALL (set_tid_address, err, 1, NULL);
-+      if (INTERNAL_SYSCALL_ERROR_P (ret, err))
-+#endif
-+      GLRO(dl_osversion) = 0x20413;
-+    }
-+}
-+#else
-+#define dl_redhat_nptl_check(cp)
-+#endif
- #define DL_SYSDEP_OSCHECK(FATAL) \
-   do {                                                                              \
-@@ -105,5 +127,6 @@ dl_fatal (const char *str)
-         FATAL ("FATAL: kernel too old\n");                                  \
-                                                                             \
-       GLRO(dl_osversion) = version;                                         \
-+      dl_redhat_nptl_check (cp);                                            \
-       }                                                                             \
-   } while (0)
diff --git a/fedora/glibc-ppc-assume.patch b/fedora/glibc-ppc-assume.patch
deleted file mode 100644 (file)
index 49ae497..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- libc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h.jj  2003-01-30 05:24:37.000000000 -0500
-+++ libc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h     2003-09-23 18:28:07.000000000 -0400
-@@ -0,0 +1,15 @@
-+/* In RHEL3, we can assume the shipped kernel, which is 2.4.21.  */
-+#include_next <kernel-features.h>
-+
-+#if !defined __ASSUME_NEW_PRCTL_SYSCALL && defined __powerpc__
-+# define __ASSUME_NEW_PRCTL_SYSCALL           1
-+#endif
-+
-+#if !defined __ASSUME_FIXED_CLONE_SYSCALL && defined __powerpc__ \
-+    && !defined __powerpc64__
-+# define __ASSUME_FIXED_CLONE_SYSCALL         1
-+#endif
-+
-+#if !defined __ASSUME_NEW_RT_SIGRETURN_SYSCALL && defined __powerpc64__
-+# define __ASSUME_NEW_RT_SIGRETURN_SYSCALL    1
-+#endif
---- libc/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c.jj        2003-03-16 01:40:44.000000000 +0100
-+++ libc/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c   2005-06-27 16:33:19.000000000 +0200
-@@ -19,7 +19,7 @@
- #include "config.h"
--#include "kernel-features.h"
-+#include <kernel-features.h>
- #include <ldsodefs.h>
- extern int __cache_line_size;
index 23fec6c7796d94b1eb0af4a7c75a7d9506743ec3..6710838ca547f3c78b661e6fa40705b4208eeff1 100644 (file)
@@ -1,4 +1,4 @@
-%define glibcrelease 3
+%define glibcrelease 19
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define xenarches i686 athlon
 %ifarch %{xenarches}
@@ -904,6 +904,7 @@ librtso=`basename $RPM_BUILD_ROOT/%{_lib}/librt.so.*`
 
 %ifarch %{rtkaioarches}
 rm -f $RPM_BUILD_ROOT{,%{_prefix}}/%{_lib}/librtkaio.so*
+rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/librt.so.*
 mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio
 mv $RPM_BUILD_ROOT/%{_lib}/librtkaio-*.so $RPM_BUILD_ROOT/%{_lib}/rtkaio/
 rm -f $RPM_BUILD_ROOT/%{_lib}/$librtso
@@ -939,7 +940,7 @@ cd ..
 
 %if %{buildpower6}
 cd build-%{nptl_target_cpu}-linuxnptl-power6
-mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6/
+mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6{,x}
 cp -a libc.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libc-*.so`
 ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libc-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libc.so.*`
 cp -a math/libm.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libm-*.so`
@@ -952,10 +953,18 @@ cp -a rt/librt.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_li
 ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/$librtso
 cp -a nptl_db/libthread_db.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libthread_db-*.so`
 ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libthread_db-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libthread_db.so.*`
+pushd $RPM_BUILD_ROOT/%{_lib}/power6x
+ln -sf ../power6/*.so .
+cp -a ../power6/*.so.* .
+popd
 %ifarch %{rtkaioarches}
-mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6
+mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6{,x}
 cp -a rtkaio/librtkaio.so $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6/`basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so | sed s/librt-/librtkaio-/`
 ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6/librtkaio-*.so` $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6/$librtso
+pushd $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6x
+ln -sf ../power6/*.so .
+cp -a ../power6/*.so.* .
+popd
 %endif
 cd ..
 %endif
@@ -1154,6 +1163,11 @@ cp -f $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo/US/Eastern $RPM_BUILD_ROOT/etc/lo
 
 rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
 
+# Make sure %config files have the same timestamp
+touch -r fedora/glibc.spec.in $RPM_BUILD_ROOT/etc/ld.so.conf
+touch -r timezone/northamerica $RPM_BUILD_ROOT/etc/localtime
+touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc
+
 cd fedora
 $GCC -Os -static -o build-locale-archive build-locale-archive.c \
   ../build-%{nptl_target_cpu}-linuxnptl/locale/locarchive.o \
@@ -1441,8 +1455,10 @@ rm -f *.filelist*
 %endif
 %if %{buildpower6}
 %dir /%{_lib}/power6
+%dir /%{_lib}/power6x
 %ifarch %{rtkaioarches}
 %dir /%{_lib}/rtkaio/power6
+%dir /%{_lib}/rtkaio/power6x
 %endif
 %endif
 %ifarch s390x
@@ -1528,6 +1544,145 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Wed Jul  4 2007 Jakub Jelinek <jakub@redhat.com> 2.5-18
+- save/restore errno around reading /etc/default/nss (BZ#4702)
+- fix LD_HWCAP_MASK handling
+
+* Fri Jun 22 2007 Jakub Jelinek <jakub@redhat.com> 2.5-17
+- disable workaround for #210748 and #211133, instead backport
+  ld.so locking fixes from the trunk (#235026)
+- Korean charsets additions (BZ#3954, BZ#3955)
+- fix handling of 2001::/32 IPv6 addresses in getaddrinfo (BZ#4102)
+- add inline optimization for fgetc_unlocked
+- fix handling of 172.{1[7-9],2[0-9],3[01]}/16 IPv4 addresses in
+  getaddrinfo
+- make sure NULL checks in routines with nonnull attribute aren't
+  optimized away
+- don't write uninitialized padding bytes to nscd socket
+- avoid misaligned reads/writes in gethostbyname_r (#243967, BZ#4381)
+- fix dl{,v}sym, dl_iterate_phdr and dlopen if some library is
+  mapped into ld.so's inter-segment hole on x86_64 (#244545)
+- fix LD_AUDIT=a:b program (#180432)
+
+* Fri Jun  8 2007 Jakub Jelinek <jakub@redhat.com> 2.5-16
+- don't crash on pseudo-zero long double values passed to
+  *printf on i?86/x86_64/ia64 (BZ#4586)
+- fix *printf %La and strtold with some hexadecimal floating point
+  constants on ppc/ppc64
+- fix nextafterl on ppc/ppc64
+
+* Wed May 30 2007 Jakub Jelinek <jakub@redhat.com> 2.5-15
+- robust mutex fixes (BZ#4512)
+- *printf fixes (BZ#4514)
+- as_IN updates (#218035)
+- use MADV_DONTNEED in malloc (#237711)
+- fix sem_timedwait on i?86 and x86_64
+- fix dladdr if some shared library is mapped into ld.so intersegment
+  VM hole (#232224, BZ#4131)
+- fdatasync is a cancellation point (BZ#4465)
+- add a temporary hack to avoid reruning DSO initializers if dlopen
+  is called from _dl_fini destructors (#234946)
+
+* Wed May  2 2007 Jakub Jelinek <jakub@redhat.com> 2.5-14
+- add transliteration for <U2044> (BZ#3213)
+- fix *scanf with %f on hexadecimal floats without exponent (BZ#4342)
+- fix *printf with very large precisions for %s (#238406, BZ#4438)
+- fix inet_ntop size checking for AF_INET (BZ#4439)
+- for *printf %e avoid 1.000e-00, for exponent 0 always use + sign (#238431)
+- fix application crashes when doing NSS lookups through nscd
+  mmapped databases and nscd decides to start garbage collection
+  during the lookups (#219145, #225315)
+- fix NIS+ __nisfind_server (#235229)
+- assorted NIS+ speedups (#233460)
+- fix power6 libm compat symbols on ppc32 (#232633)
+- fix child refcntr in NPTL fork (#230198)
+- fix ifaddrs with many net devices on > 4KB page size arches (#230151)
+- fix pthread_mutex_timedlock on x86_64 (#228103)
+- fix HAVE_LIBCAP configure detection (#178934)
+- fix double free in fts_close (#222089)
+- fix vfork+execvp memory leak (#221187)
+- further localedef robustification (#203728)
+- fix printf with %g and values tiny bit smaller than 1.e-4 (#235864,
+  BZ#4362, BZ#4070)
+- fix _XOPEN_VERSION (BZ#4364)
+- nexttoward*/nextafter* fixes (BZ#3306)
+- various fixes (BZ#3919, BZ#4101, BZ#4130, BZ#4181, BZ#4069, BZ#3458,
+  BZ#3348, BZ#4344, BZ#4368, BZ#4305, BZ#4306)
+- fix nftw with FTW_CHDIR on / (BZ#4076)
+- nscd fixes (BZ#4074)
+- fix euidaccess (BZ#3842)
+- assorted locale data fixes (BZ#3322, BZ#3995, BZ#3884, BZ#3851, BZ#4411)
+- fix strptime (BZ#3944)
+- fix regcomp with REG_NEWLINE (BZ#3957)
+- fix %0lld printing of 0LL on 32-bit architectures (BZ#3902)
+- soft-fp fixes (BZ#2749)
+- further strtod fixes (BZ#3855)
+- update ru and sv translations
+- fix fesetround return value on ia64
+- fix nscd SIGHUP database invalidation
+
+* Mon Jan 15 2007 Jakub Jelinek <jakub@redhat.com> 2.5-12
+- add a workaround for #210748 and #211133
+- fix NIS getservbyname when proto is NULL
+
+* Fri Jan  5 2007 Jakub Jelinek <jakub@redhat.com> 2.5-10
+- fix nss_compat +group handling (#220658)
+
+* Fri Dec 22 2006 Jakub Jelinek <jakub@redhat.com> 2.5-9
+- make sure pthread_kill doesn't return EINVAL even if
+  the target thread exits in between pthread_kill ESRCH check
+  and the actual tgkill syscall (#220420)
+
+* Tue Dec 19 2006 Jakub Jelinek <jakub@redhat.com> 2.5-8
+- fix setcontext on ppc32 (#219107)
+- fix wide stdio after setvbuf (#217064, BZ#2337)
+- fix {j,m}rand48{,_r} on 64-bit arches (BZ#3747)
+- handle power6x AT_PLATFORM (#216970)
+- fix a race condition in getXXbyYY_r (#219145)
+- fix tst-pselect testcase
+
+* Tue Dec 12 2006 Jakub Jelinek <jakub@redhat.com> 2.5-7
+- fix hasmntopt (#218802)
+- fix setusershell and getusershell (#218782)
+- strtod fixes (BZ#3664, BZ#3673, BZ#3674)
+- fix ttyname and ttyname_r with invalid file descriptor (#218276)
+- fix nis_getnames if the default domain doesn't contain at least
+  two dots (#206483)
+- fix memusage with realloc (x, 0)
+
+* Wed Nov 29 2006 Jakub Jelinek <jakub@redhat.com> 2.5-6
+- fix svc_run (#216834, BZ#3559)
+- make sure there is consistent timestamp for /etc/ld.so.conf,
+  /etc/localtime and /etc/rpc between multilib glibc rpms
+- fix :include: /etc/alias handling (#215572)
+- update powerpc-cpu add-on to version 0.4 (#196319)
+- add power6x subdir to /%{_lib}/ and /%{_lib}/rtkaio/,
+  link all libs from ../power6/* into them
+- update nl, sv, pl and tr translations
+- add mai_IN locale (#213415)
+- fix es_ES LC_TIME (BZ#3320)
+
+* Tue Nov 14 2006 Jakub Jelinek <jakub@redhat.com> 2.5-5
+- remove bogus %{_libdir}/librt.so.1 symlink (#213555)
+- fix memusage (#213656)
+- fix sysconf (_SC_LEVEL{2,3}_CACHE_SIZE) on Intel Core Duo
+  CPUs
+- fix ld.so locking on dlopen failures (#213037, BZ#3429)
+- fix libthread_db.so on TLS_DTV_AT_TP architectures (#215513)
+- fix --inhibit-rpath (#214569)
+- fix _r_debug content when prelinked ld.so executes
+  a program as its argument
+- handle new tzdata format to cope with year > 2037 transitions
+  on 64-bit architectures
+- fix strxfrm
+- fix i?86 floor and ceil inlines (BZ#3451)
+
+* Thu Oct 19 2006 Jakub Jelinek <jakub@redhat.com> 2.5-4
+- fix i?86 6 argument syscalls (e.g. splice)
+- fix rtld minimal realloc (BZ#3352)
+- fix RFC3484 getaddrinfo sorting according to rules 4 and 7 (BZ#3369)
+- fix xdrmem_setpos (#211452)
+
 * Sun Oct  8 2006 Jakub Jelinek <jakub@redhat.com> 2.5-3
 - bump __GLIBC_MINOR__
 - increase PTHREAD_STACK_MIN on ppc{,64} to 128K to allow
index 3b2558d244c5dfee61ac5a8cbe340c1854b1ac80..8f1142143194cbeba9d1bcda55dc382bf8a26bb6 100644 (file)
@@ -68,6 +68,7 @@ static gid_t *server_groups;
 # define NGROUPS 32
 #endif
 static int server_ngroups;
+static volatile int sighup_pending;
 
 static pthread_attr_t attr;
 
@@ -1329,6 +1330,10 @@ nscd_run (void *p)
              if (readylist == NULL && to == ETIMEDOUT)
                {
                  --nready;
+
+                 if (sighup_pending)
+                   goto sighup_prune;
+
                  pthread_mutex_unlock (&readylist_lock);
                  goto only_prune;
                }
@@ -1338,6 +1343,34 @@ nscd_run (void *p)
            pthread_cond_wait (&readylist_cond, &readylist_lock);
        }
 
+      if (sighup_pending)
+       {
+         --nready;
+         pthread_cond_signal (&readylist_cond);
+       sighup_prune:
+         sighup_pending = 0;
+         pthread_mutex_unlock (&readylist_lock);
+
+         /* Prune the password database.  */
+         if (dbs[pwddb].enabled)
+           prune_cache (&dbs[pwddb], LONG_MAX, -1);
+
+         /* Prune the group database.  */
+         if (dbs[grpdb].enabled)
+           prune_cache (&dbs[grpdb], LONG_MAX, -1);
+
+         /* Prune the host database.  */
+         if (dbs[hstdb].enabled)
+           prune_cache (&dbs[hstdb], LONG_MAX, -1);
+
+         /* Re-locking.  */
+         pthread_mutex_lock (&readylist_lock);
+
+         /* One more thread available.  */
+         ++nready;
+         continue;
+       }
+
       struct fdlist *it = readylist->next;
       if (readylist->next == readylist)
        /* Just one entry on the list.  */
@@ -1919,16 +1952,5 @@ finish_drop_privileges (void)
 void
 sighup_handler (int signum)
 {
-  /* Prune the password database.  */
-  if (dbs[pwddb].enabled)
-    prune_cache (&dbs[pwddb], LONG_MAX, -1);
-    
-  /* Prune the group database.  */
-  if (dbs[grpdb].enabled)
-    prune_cache (&dbs[grpdb], LONG_MAX, -1);
-
-  /* Prune the host database.  */
-  if (dbs[hstdb].enabled)
-    prune_cache (&dbs[hstdb], LONG_MAX, -1);
+  sighup_pending = 1;
 }
-