Re: [RFC PATCH 3/3] rseq: extend struct rseq with numa node id

From
Peter Zijlstra <peterz@infradead.org>
Date
2022-02-06 21:52:40
Also in
lkml
Reply to
Mathieu Desnoyers, 2022-02-03
On Thu, Feb 03, 2022 at 02:38:53PM -0500, Mathieu Desnoyers wrote:
quoted hunk ↗ jump to hunk
+static int rseq_reset_rseq_cpu_node_id(struct task_struct *t)
 {
-	u32 cpu_id_start = 0, cpu_id = RSEQ_CPU_ID_UNINITIALIZED;
+	u32 cpu_id_start = 0, cpu_id = RSEQ_CPU_ID_UNINITIALIZED, node_id = 0;
 
 	/*
 	 * Reset cpu_id_start to its initial state (0).
@@ -124,6 +126,11 @@ static int rseq_reset_rseq_cpu_id(struct task_struct *t)
 	 */
 	if (put_user(cpu_id, &t->rseq->cpu_id))
 		return -EFAULT;
+	/*
+	 * Reset node_id to its initial state (0).
+	 */
+	if (put_user(node_id, &t->rseq->node_id))
+		return -EFAULT;
Why 0 vs -1 ?
Thread (7 messages) 7 messages, 2 authors, last reply 2022-02-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help