Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/rseq: parametrized test: Report/abort on negative concurrency ID

Report and abort when a negative concurrency ID value is observed by the
spinlock test.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221122203932.231377-21-mathieu.desnoyers@efficios.com

authored by

Mathieu Desnoyers and committed by
Peter Zijlstra
a3798e6f ee31fff0

+5
+5
tools/testing/selftests/rseq/param_test.c
··· 410 410 int ret; 411 411 412 412 cpu = get_current_cpu_id(); 413 + if (cpu < 0) { 414 + fprintf(stderr, "pid: %d: tid: %d, cpu: %d: cid: %d\n", 415 + getpid(), (int) rseq_gettid(), rseq_current_cpu_raw(), cpu); 416 + abort(); 417 + } 413 418 ret = rseq_cmpeqv_storev(RSEQ_MO_RELAXED, RSEQ_PERCPU, 414 419 &lock->c[cpu].v, 415 420 0, 1, cpu);