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

Peter Zijlstra
2022-02-06T21:52:40Z

On Thu, Feb 03, 2022 at 02:38:53PM -0500, Mathieu Desnoyers wrote:
> +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 ?