google / kernel-sanitizers

Linux Kernel Sanitizers, fast bug-detectors for the Linux kernel
https://google.github.io/kernel-sanitizers/
442 stars 87 forks source link

false positives on irq stack #210

Open dvyukov opened 9 years ago

dvyukov commented 9 years ago

Interrupt stack irq_stack_ptr is shared between all interrupts on the same CPU. But these interrupts can happen on different threads. As the result KTSAN can produce false positives on IRQ stack. Namely interrupt 1 that executes on thread 1 writes to IRQ stack. Then interrupt 2 that executes on thread 2 writes to the same location of IRQ stack. If thread 2 and thread 1 are not synchronized, KTSAN will report a race. This is a pure mental experiment, but I don't see why it can't happen.