From 85fe199795c91510ad495c04aea535705ad9abb5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 3 Aug 2012 19:54:08 +0000 Subject: Remove some pre-2.6.0 Linux kernel conditionals. --- nptl/ChangeLog | 6 ++++++ nptl/nptl-init.c | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'nptl') 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 + + * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make + code unconditional. + (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise. + 2012-07-28 Siddhesh Poyarekar * 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; -- cgit 1.4.1