aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
diff options
context:
space:
mode:
authorAndi Shyti <[email protected]>2023-12-04 16:38:03 +0000
committerGreg Kroah-Hartman <[email protected]>2023-12-07 01:48:45 +0000
commitf0b9d97a77fa8f18400450713358303a435ab688 (patch)
tree72f4af1cfd6b5de233d33f50b8b016fea8516fa5 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
parentARM: PL011: Fix DMA support (diff)
downloadkernel-f0b9d97a77fa8f18400450713358303a435ab688.tar.gz
kernel-f0b9d97a77fa8f18400450713358303a435ab688.zip
serial: ma35d1: Validate console index before assignment
The console is immediately assigned to the ma35d1 port without checking its index. This oversight can lead to out-of-bounds errors when the index falls outside the valid '0' to MA35_UART_NR range. Such scenario trigges ran error like the following: UBSAN: array-index-out-of-bounds in drivers/tty/serial/ma35d1_serial.c:555:51 index -1 is out of range for type 'uart_ma35d1_port [17] Check the index before using it and bail out with a warning. Fixes: 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support") Signed-off-by: Andi Shyti <[email protected]> Cc: Jacky Huang <[email protected]> Cc: <[email protected]> # v6.5+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions