in st-dma-fence.c [511:544]
static int race_signal_callback(void *arg)
{
struct dma_fence __rcu *f[2] = {};
int ret = 0;
int pass;
for (pass = 0; !ret && pass <= 1; pass++) {
struct race_thread t[2];
int i;
for (i = 0; i < ARRAY_SIZE(t); i++) {
t[i].fences = f;
t[i].id = i;
t[i].before = pass;
t[i].task = kthread_run(thread_signal_callback, &t[i],
"dma-fence:%d", i);
get_task_struct(t[i].task);
}
msleep(50);
for (i = 0; i < ARRAY_SIZE(t); i++) {
int err;
err = kthread_stop(t[i].task);
if (err && !ret)
ret = err;
put_task_struct(t[i].task);
}
}
return ret;
}