hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/um/tls_64.c
....@@ -6,14 +6,13 @@
66 {
77 }
88
9
-int arch_copy_tls(struct task_struct *t)
9
+int arch_set_tls(struct task_struct *t, unsigned long tls)
1010 {
1111 /*
1212 * If CLONE_SETTLS is set, we need to save the thread id
13
- * (which is argument 5, child_tid, of clone) so it can be set
14
- * during context switches.
13
+ * so it can be set during context switches.
1514 */
16
- t->thread.arch.fs = t->thread.regs.regs.gp[R8 / sizeof(long)];
15
+ t->thread.arch.fs = tls;
1716
1817 return 0;
1918 }