it is reproduced easily with multiple es11 cts tests,
gpu kernel panic in function _ConvertLogical2Physical.
need remove mdl from global list before destroy map list,
this can prevent the wrong access on the freed map data.
Date: Dec 22, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
allocator->ops->Free(allocator, Mdl);
}
- list_for_each_entry_safe(mdlMap, next, &Mdl->mapsHead, link)
- {
- gcmkVERIFY_OK(_DestroyMdlMap(Mdl, mdlMap));
- }
-
if (Mdl->link.next)
{
/* Remove the node from global list.. */
mutex_unlock(&os->mdlMutex);
}
+ list_for_each_entry_safe(mdlMap, next, &Mdl->mapsHead, link)
+ {
+ gcmkVERIFY_OK(_DestroyMdlMap(Mdl, mdlMap));
+ }
+
kfree(Mdl);
}