clone3: ensure copy_thread_tls is implemented
authorAmanieu d'Antras <amanieu@gmail.com>
Thu, 2 Jan 2020 17:24:13 +0000 (18:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 19:08:35 +0000 (20:08 +0100)
commit4f43cdc72331bdbf3562d266969779aed7a834af
tree676c15f1a8e71eb59e2f4bc1f4ef6e4fe5635efa
parent3981d85a91824e529de5ee5128ec0b5bb63d1a42
clone3: ensure copy_thread_tls is implemented

commit dd499f7a7e34270208350a849ef103c0b3ae477f upstream.

copy_thread implementations handle CLONE_SETTLS by reading the TLS
value from the registers containing the syscall arguments for
clone. This doesn't work with clone3 since the TLS value is passed
in clone_args instead.

Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
Cc: <stable@vger.kernel.org> # 5.3.x
Link: https://lore.kernel.org/r/20200102172413.654385-8-amanieu@gmail.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/fork.c