• Chris Metcalf's avatar
    arch/tile: handle CLONE_SETTLS in copy_thread(), not user space · bc4cf2bb
    Chris Metcalf authored
    Previously we were just setting up the "tp" register in the
    new task as started by clone() in libc.  However, this is not
    quite right, since in principle a signal might be delivered to
    the new task before it had its TLS set up.  (Of course, this race
    window still exists for resetting the libc getpid() cached value
    in the new task, in principle.  But in any case, we are now doing
    this exactly the way all other architectures do it.)
    
    This change is important for 2.6.37 since the tile glibc we will
    be submitting upstream will not set TLS in user space any more,
    so it will only work on a kernel that has this fix.  It should
    also be taken for 2.6.36.x in the stable tree if possible.
    Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
    Cc: stable <stable@kernel.org>
    bc4cf2bb
process.c 19.7 KB