summaryrefslogtreecommitdiff
path: root/include/asm-um/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRong Zhang <rongrong@oss.cipunited.com>2026-03-16 01:28:22 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2026-04-01 21:49:44 +0200
commit35d8945bf9b0c4d9586c7fa9fadeecf2cfc26c23 (patch)
tree94ff45332359cc40dc0376bd9909f45066ccb06a /include/asm-um/git@git.tavy.me:linux.git
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff)
MIPS: Loongson64: env: Check UARTs passed by LEFI cautiously
Some firmware does not set nr_uarts properly and passes empty items. Iterate at most min(system->nr_uarts, MAX_UARTS) items to prevent out-of-bounds access, and ignore UARTs with addr 0 silently. Meanwhile, our DT only works with UPIO_MEM but theoretically firmware may pass other IO types, so explicitly check against that. Tested on Loongson-LS3A4000-7A1000-NUC-SE. Fixes: 3989ed418483 ("MIPS: Loongson64: env: Fixup serial clock-frequency when using LEFI") Cc: stable@vger.kernel.org Reviewed-by: Yao Zi <me@ziyao.cc> Signed-off-by: Rong Zhang <rongrong@oss.cipunited.com> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'include/asm-um/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions