Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[amdgpu] Fix reproducible crash when running sysctl -a (#113)
* [amdgpu] Fix reproducible crash when running sysctl -a When running `sysctl -a` the system immediately panics. This is on an Acer Aspire E5-551G with an 'AMD A10-7300 Radeon R6' APU. ``` amdgpu_get_pp_num_states() at amdgpu_get_pp_num_states+0x76/frame 0xfffffe004a9f3680 sysctl_handle_attr() at sysctl_handle_attr+0x71/frame 0xfffffe004a9f36d0 sysctl_root_handler_locked() at sysctl_root_handler_locked+0x8b/frame 0xfffffe004a9f3710 ``` In amdgpu_get_pp_num_states() `adev->powerplay.pp_funcs->get_pp_num_states` could be false, and `data` would be left uninitialized. Always initializing `data` to zero fixes the crash. Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org> * Update amdgpu_pm.c
- Loading branch information