about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-08-03 19:54:08 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-08-03 19:54:08 +0000
commit85fe199795c91510ad495c04aea535705ad9abb5 (patch)
tree2be65f4998065544439cd659c784f128db560604 /nptl
parent4f75b7a09a57e0d33ee0741c18114ce8ac5d6c3f (diff)
downloadglibc-85fe199795c91510ad495c04aea535705ad9abb5.tar.gz
glibc-85fe199795c91510ad495c04aea535705ad9abb5.tar.xz
glibc-85fe199795c91510ad495c04aea535705ad9abb5.zip
Remove some pre-2.6.0 Linux kernel conditionals.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog6
-rw-r--r--nptl/nptl-init.c12
2 files changed, 6 insertions, 12 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 6969fd256d..bf9bf926b6 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-03  Joseph Myers  <joseph@codesourcery.com>
+
+	* nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
+	code unconditional.
+	(sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
+
 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 5216ce1f5a..6a18dbe1b5 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -172,24 +172,18 @@ __nptl_set_robust (struct pthread *self)
 static void
 sigcancel_handler (int sig, siginfo_t *si, void *ctx)
 {
-#ifdef __ASSUME_CORRECT_SI_PID
   /* Determine the process ID.  It might be negative if the thread is
      in the middle of a fork() call.  */
   pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
   if (__builtin_expect (pid < 0, 0))
     pid = -pid;
-#endif
 
   /* Safety check.  It would be possible to call this function for
      other signals and send a signal from another process.  This is not
      correct and might even be a security problem.  Try to catch as
      many incorrect invocations as possible.  */
   if (sig != SIGCANCEL
-#ifdef __ASSUME_CORRECT_SI_PID
-      /* Kernels before 2.5.75 stored the thread ID and not the process
-	 ID in si_pid so we skip this test.  */
       || si->si_pid != pid
-#endif
       || si->si_code != SI_TKILL)
     return;
 
@@ -235,24 +229,18 @@ struct xid_command *__xidcmd attribute_hidden;
 static void
 sighandler_setxid (int sig, siginfo_t *si, void *ctx)
 {
-#ifdef __ASSUME_CORRECT_SI_PID
   /* Determine the process ID.  It might be negative if the thread is
      in the middle of a fork() call.  */
   pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
   if (__builtin_expect (pid < 0, 0))
     pid = -pid;
-#endif
 
   /* Safety check.  It would be possible to call this function for
      other signals and send a signal from another process.  This is not
      correct and might even be a security problem.  Try to catch as
      many incorrect invocations as possible.  */
   if (sig != SIGSETXID
-#ifdef __ASSUME_CORRECT_SI_PID
-      /* Kernels before 2.5.75 stored the thread ID and not the process
-	 ID in si_pid so we skip this test.  */
       || si->si_pid != pid
-#endif
       || si->si_code != SI_TKILL)
     return;