mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-15 04:20:28 +08:00
nptl: initialize cpu_id_start prior to rseq registration
When adding explicit initialization of rseq fields prior to
registration, I glossed over the fact that 'cpu_id_start' is also
documented as initialized by user-space.
While current kernels don't validate the content of this field on
registration, future ones could.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
(cherry picked from commit d9f40387d3
)
This commit is contained in:
parent
47d70ca8d9
commit
7ea35e28b4
@ -56,6 +56,7 @@ rseq_register_current_thread (struct pthread *self, bool do_rseq)
|
||||
registration, there is no guarantee that struct pthread is
|
||||
cleared on all architectures. */
|
||||
THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_UNINITIALIZED);
|
||||
THREAD_SETMEM (self, rseq_area.cpu_id_start, 0);
|
||||
THREAD_SETMEM (self, rseq_area.rseq_cs, 0);
|
||||
THREAD_SETMEM (self, rseq_area.flags, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user