gpu/intel: use _owner.cap during session destruction

'cap()' will return invalid capability within session destructor, therefore Vram
objects that belong to the session will not be destroyed, leading to danling
references later on. Use '_owner.cap' of session instead.
This commit is contained in:
Sebastian Sumpf 2023-03-15 15:00:09 +01:00 committed by Norman Feske
parent 61926ebc07
commit 40333a8ee2

View File

@ -1805,7 +1805,11 @@ class Gpu::Session_component : public Genode::Session_object<Gpu::Session>
_apply_vram(vram_local, [&](Vram &vram) {
if (vram.owner(cap()) == false) return false;
/*
* Note: cap() will return invalid cap at this point, so use
* _owner.cap
*/
if (vram.owner(_owner.cap) == false) return false;
if (vram.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) {
_device.unmap_vram(_heap, vram.map);