mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Revert to original version of setxid race fix
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2010-03-08 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
|
* pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
|
||||||
|
* allocatestack.c (get_cached_stack): Set setxid_futex.
|
||||||
|
(allocate_stack): Likewise.
|
||||||
|
|
||||||
2010-03-05 Andreas Schwab <schwab@redhat.com>
|
2010-03-05 Andreas Schwab <schwab@redhat.com>
|
||||||
Ulrich Drepper <drepper@redhat.com>
|
Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
@ -213,6 +213,9 @@ get_cached_stack (size_t *sizep, void **memp)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't allow setxid until cloned. */
|
||||||
|
result->setxid_futex = -1;
|
||||||
|
|
||||||
/* Dequeue the entry. */
|
/* Dequeue the entry. */
|
||||||
stack_list_del (&result->list);
|
stack_list_del (&result->list);
|
||||||
|
|
||||||
@ -418,6 +421,9 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
|||||||
/* The process ID is also the same as that of the caller. */
|
/* The process ID is also the same as that of the caller. */
|
||||||
pd->pid = THREAD_GETMEM (THREAD_SELF, pid);
|
pd->pid = THREAD_GETMEM (THREAD_SELF, pid);
|
||||||
|
|
||||||
|
/* Don't allow setxid until cloned. */
|
||||||
|
pd->setxid_futex = -1;
|
||||||
|
|
||||||
/* Allocate the DTV for this thread. */
|
/* Allocate the DTV for this thread. */
|
||||||
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
|
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
|
||||||
{
|
{
|
||||||
@ -554,6 +560,9 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
|||||||
THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO;
|
THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Don't allow setxid until cloned. */
|
||||||
|
pd->setxid_futex = -1;
|
||||||
|
|
||||||
/* The process ID is also the same as that of the caller. */
|
/* The process ID is also the same as that of the caller. */
|
||||||
pd->pid = THREAD_GETMEM (THREAD_SELF, pid);
|
pd->pid = THREAD_GETMEM (THREAD_SELF, pid);
|
||||||
|
|
||||||
|
@ -542,9 +542,6 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't allow setxid until cloned. */
|
|
||||||
pd->setxid_futex = -1;
|
|
||||||
|
|
||||||
/* Pass the descriptor to the caller. */
|
/* Pass the descriptor to the caller. */
|
||||||
*newthread = (pthread_t) pd;
|
*newthread = (pthread_t) pd;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user