User Tools

Site Tools


Using coccinelle to detect (and fix) nested execution context violations

Saturday, October 21, 2017 • 10:10 - 11:00


If you follow the linux-rt-users mailing list long enough, you'll observe that patches in the form of “convert foo to use raw spinlocks” are alarmingly common. Why?

I'll be speaking briefly about the technical reasons why raw spinlocks are needed, when they are or are not appropriate to be used in driver code, and some work I've done to identify and automate the lock conversions using coccinelle.

For following discussion: while the understanding of the differences between raw and non-raw variants of spinlocks are somewhat well understood in the RT community, the differences aren't well understood by mainline driver developers; what strategies might we employ to change this?


Driver developers, PREEMPT_RT developers, or potential developers.


Jula Cartwright, National Instruments

Julia Cartwright is a kernel engineer and maintainer of the 4.1-rt stable tree. She currently works in the Open Source office at National Instruments in Austin, Texas, where she provides internal technical consulting on Linux, as well as wider open source consulting and advocacy. She can be found on the linux-rt-users mailing list, #linux-rt, and #kernelnewbies IRC channels.

Outside of RT, her interests include ARM SoCs, FPGAs, bread baking, bicycling, and beer.

realtime/events/rt-summit2017/using-coccinelle-to-detect-nested-execution-context-violations.txt · Last modified: 2017/09/05 14:02 by anna-maria