A race condition is nothing but a bug where two pieces of code cause an error if executed concurrently. This blog post explains how to trigger races reliably in Linux kernel.
How to trigger races reliably in Linux kernel
From the blog post:
As a kernel QA I’m mostly interested in writing testcases that can reproduce once fixed races in kernel code in order to avoid regressions and also to make sure all code streams, such as stable kernels, are bug free.
The main problem with these tests is that they are notoriously unreliable. Especially when the race window is very small, just a few instructions in length, it’s nearly impossible to write a test that can reasonably reliably trigger the problem.
- Read more: How to trigger races reliably