@inproceedings{af2f1935e7fe47e1950fdc4ee044fba0,
title = "Automated resource release in device drivers",
abstract = "Device drivers require system resources to control hardware and provide fundamental services for applications. The acquired resources must be explicitly released by drivers. Otherwise, these resources will never be reclaimed by the operating system, and they are not available for other programs any more, causing hard-to-find system problems. We study on Linux driver mailing lists, and find many applied patches handle improper resource-release operations, especially in error handling paths. In order to improve current resource management and avoid resource-release omissions in device drivers, we propose a novel approach named AutoRR, which can automatically and safely release resources based on specification-mining techniques. During execution, we maintain a resource-state table by recording the runtime information of function calls. If the driver fails to release acquired resources during execution, AutoRR will report violations and call corresponding releasing functions with the recorded runtime information to release acquired resources. To fully and safely release acquired resources, a dynamic analysis of resource dependency and allocation hierarchy is also performed, which can avoid dead resources and double frees. AutoRR works in both normal execution and error handling paths for reliable resource management. We implement AutoRR with LLVM, and evaluate it on 8 Ethernet drivers in Linux 3.17.2. The evaluation shows that the overhead of AutoRR is very low, and it has successfully fixed 18 detected resource-release omission violations without side effects. Our work shows a feasible way of using specification-mining results to avoid related violations.",
keywords = "LLVM, device drivers, dynamic analysis, operating systems, resource management, resource release",
author = "Bai, {Jia Ju} and Wang, {Yu Ping} and Liu, {Hu Qiu} and Hu, {Shi Min}",
note = "Publisher Copyright: {\textcopyright} 2015 IEEE.; 26th IEEE International Symposium on Software Reliability Engineering, ISSRE 2015 ; Conference date: 02-11-2015 Through 05-11-2015",
year = "2016",
month = jan,
day = "13",
doi = "10.1109/ISSRE.2015.7381811",
language = "English",
series = "2015 IEEE 26th International Symposium on Software Reliability Engineering, ISSRE 2015",
publisher = "Institute of Electrical and Electronics Engineers Inc.",
pages = "172--182",
booktitle = "2015 IEEE 26th International Symposium on Software Reliability Engineering, ISSRE 2015",
address = "United States",
}