]> git.baikalelectronics.ru Git - kernel.git/commit
amdgpu: fix NULL pointer dereference at tonga_check_states_equal
authorBradley Pankow <btpankow@gmail.com>
Tue, 23 Feb 2016 01:11:47 +0000 (20:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Feb 2016 17:46:05 +0000 (12:46 -0500)
commitefec9c8edff63f42367d71a7cbad08c07cb46fb3
tree5d4cc614c8cca674f067946d07898fae3f9b8aac
parent58e65b416133249e08d6573b5510f64426c2bd55
amdgpu: fix NULL pointer dereference at tonga_check_states_equal

The event_data passed from pem_fini was not cleared upon initialization.
This caused NULL checks to pass and cast_const_phw_tonga_power_state to
attempt to dereference an invalid pointer. Clear the event_data in
pem_init and pem_fini before calling pem_handle_event.

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Bradley Pankow <btpankow@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c