Skip to Main content Skip to Navigation
Journal articles

Effective Detection of Sleep-in-Atomic-Context Bugs in the Linux Kernel

Abstract : Atomic context is an execution state of the Linux kernel, in which kernel code monopolizes a CPU core. In this state, the Linux kernel may only perform operations that cannot sleep, as otherwise a system hang or crash may occur. We refer to this kind of concurrency bug as a sleep-in-atomic-context (SAC) bug. In practice, SAC bugs are hard to find, as they do not cause problems in all executions. In this paper, we propose a practical static approach named DSAC, to effectively detect SAC bugs in the Linux kernel. DSAC uses three key techniques: (1) a summary-based analysis to identify the code that may be executed in atomic context, (2) a connection-based alias analysis to identify the set of functions referenced by a function pointer, and (3) a path-check method to filter out repeated reports and false bugs. We evaluate DSAC on Linux 4.17, and find 1159 SAC bugs. We manually check all the bugs, and find that 1068 bugs are real. We have randomly selected 300 of the real bugs and sent them to kernel developers. 220 of these bugs have been confirmed, and 51 of our patches fixing 115 bugs have been applied.
Document type :
Journal articles
Complete list of metadata
Contributor : Julia Lawall Connect in order to contact the contributor
Submitted on : Monday, November 30, 2020 - 6:38:43 PM
Last modification on : Friday, January 21, 2022 - 3:17:18 AM
Long-term archiving on: : Monday, March 1, 2021 - 7:59:55 PM


Files produced by the author(s)



Jia-Ju Bai, Julia Lawall, Shi-Min Hu. Effective Detection of Sleep-in-Atomic-Context Bugs in the Linux Kernel. ACM Transactions on Computer Systems, Association for Computing Machinery, 2020, 36 (4), pp.10. ⟨10.1145/3381990⟩. ⟨hal-03032244⟩



Les métriques sont temporairement indisponibles