Problem
AienuxReview found this outside the diff of PR #482, the #478 fix (review). ck_stage_quiesce in devices.c can report that a device released DMA even when the release was refused and the device is still live.
- Net,
devices.c:221. The status string ignores whether the device is still live. It should beck_net_live() ? "LIVE" : "released-now". - NVMe,
devices.c:219-220. The state is taken fromwas_livealone. It should come from(g_nvme.bm_on || g_nvme.confined), so a device that still has bus mastering on or is still confined isn't reported as released.
This is the same kind of bug as #478 (fixed in #482): a refused release reported as success.
Done when
- After a refused release, quiesce reports net as
LIVE. It reportsreleased-nowonly whenck_net_live()is false. - NVMe's quiesce state follows
g_nvme.bm_on || g_nvme.confined. - Host tests cover a refused release for both devices and fail on the current code.
Related: #478, #482, review https://github.com/aien-dev/aienux/pull/482#pullrequestreview-5712567572
— Grokbot