mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN
commit 44035ec2fde1114254ee465f9ba3bb246b0b6283 upstream. There's been a very long running bug that seems to have been neglected for a while, where amdgpu consistently triggers a KASAN error at start: BUG: KASAN: global-out-of-bounds in read_indirect_azalia_reg+0x1d4/0x2a0 [amdgpu] Read of size 4 at addr ffffffffc2274b28 by task modprobe/1889 After digging through amd's rather creative method for accessing registers, I eventually discovered the problem likely has to do with the fact that on my dce120 GPU there are supposedly 7 sets of audio registers. But we only define a register mapping for 6 sets. So, fix this and fix the KASAN warning finally. Signed-off-by: Lyude Paul <lyude@redhat.com> Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a541f1f0ce
commit
d4e9bab771
1 changed files with 2 additions and 1 deletions
|
|
@ -340,7 +340,8 @@ static const struct dce_audio_registers audio_regs[] = {
|
|||
audio_regs(2),
|
||||
audio_regs(3),
|
||||
audio_regs(4),
|
||||
audio_regs(5)
|
||||
audio_regs(5),
|
||||
audio_regs(6),
|
||||
};
|
||||
|
||||
#define DCE120_AUD_COMMON_MASK_SH_LIST(mask_sh)\
|
||||
|
|
|
|||
Loading…
Reference in a new issue