drm/amd/powerplay: Fix KASAN user after free on driver unload.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 14 Mar 2018 18:07:49 +0000 (14:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Mar 2018 14:55:03 +0000 (09:55 -0500)
commit3bb271f3cabc464a94dd9fc24df234f3c18d139b
tree164ab0fc2c481c0ca263a283ad9e92b82ddd55e6
parent2f51d6e8e485b5efd5983c2454c54815eec02a46
drm/amd/powerplay: Fix KASAN user after free on driver unload.

Reusing local handle to initialize BO without resetting it to
NULL is wrong since it causes amdgpu_bo_create_reserved to skip
new BO creation and just reuse the given pointer for pinning.

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c