|Priority:||4 - Normal|
|Created by:||Patrick Mooney [X]|
|Reported by:||Patrick Mooney [X]|
|Assigned to:||Hans Rosenfeld [X]|
Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-06-12T08:29:17.242Z)
2018-06-21 Underwater Reactor (Release Date: 2018-06-21)
During the course of
vtd_init, the bhyve vt-d logic sets up mappings to DMA-remapping resources. It lacks robust error handling in the face of failures, potentially leaking resources or causing NULL-pointer accesses. Even in the face of success, the function to clean up those mapped resources is empty, causing them to be leaked if
vmm is ever unloaded.
This is not a threat to pure compute bhyve instances which do not touch the ppt functionality at all, but should be addressed before instances which consume ppt go into production.
Testing: I've been running with these changes for a while and they didn't cause any regressions. The cleanup obviously works as the system now spends a few minutes cleanup up the host domain when the last VM is removed. The performance issue is due to inefficiencies in the malloc/free implementation in vmm_sol_glue.c.
illumos-joyent commit 76d673bac97855d00448cd767b6f3439f4be8d12 (branch master, by Hans Rosenfeld)
OS-6740 bhyve vtd leaks mapping resources
Reviewed by: Jerry Jelinek <email@example.com>
Reviewed by: Patrick Mooney <firstname.lastname@example.org>
Approved by: Patrick Mooney <email@example.com>