Detecting Data Races Caused by Inconsistent Lock Protection in Device Drivers

Abstract : Data races are often hard to detect in device drivers, due to the non-determinism of concurrent execution. According to our study of Linux driver patches that fix data races, more than 38% of patches involve a pattern that we call inconsistent lock protection. Specifically, if a variable is accessed within two concurrently executed functions, the sets of locks held around each access are disjoint, at least one of the locksets is non-empty, and at least one of the involved accesses is a write, then a data race may occur. In this paper, we present a runtime analysis approach, named DILP, to detect data races caused by inconsistent lock protection in device drivers. By monitoring driver execution, DILP collects the information about runtime variable accesses and executed functions. Then after driver execution, DILP analyzes the collected information to detect and report data races caused by inconsistent lock protection. We evaluate DILP on 12 device drivers in Linux 4.16.9, and find 25 real data races.
Liste complète des métadonnées

https://hal.inria.fr/hal-02014196
Contributor : Julia Lawall <>
Submitted on : Monday, February 11, 2019 - 3:15:32 PM
Last modification on : Wednesday, March 27, 2019 - 1:34:00 AM

Identifiers

  • HAL Id : hal-02014196, version 1

Citation

Qiu-Liang Chen, Jia-Ju Bai, Zu-Ming Jiang, Julia Lawall, Shi-Min Hu. Detecting Data Races Caused by Inconsistent Lock Protection in Device Drivers. SANER 2019 - 26th IEEE International Conference on Software Analysis, Evolution and Reengineering, Feb 2019, Hangzhou, China. ⟨hal-02014196⟩

Share

Metrics

Record views

103

Files downloads

90