Note that storage for routine and parameter is static, not per-CPU. That will race if you have two CPUs doing simultaneous irq_offload() calls.
This is exactly the architecture of the smp_abort test added in #72119 , and indeed it fails spuriously for me at about 3-5% frequency. Adding logging, you can see that what happens is that the two ISRs get the same argument struct.
(A nice extra is that Peter's test turns out to be a good regression test for this sort of thing in the future)
The implementation of irq_offload() on x86_64 looks like this (see https://github.com/zephyrproject-rtos/zephyr/blob/main/arch/x86/core/intel64/irq_offload.c#L21)
Note that storage for routine and parameter is static, not per-CPU. That will race if you have two CPUs doing simultaneous irq_offload() calls.
This is exactly the architecture of the smp_abort test added in #72119 , and indeed it fails spuriously for me at about 3-5% frequency. Adding logging, you can see that what happens is that the two ISRs get the same argument struct.
(A nice extra is that Peter's test turns out to be a good regression test for this sort of thing in the future)