dpaa2-switch: Fix interrupt storm after receiving bad if_id in IRQ handler
authorGuenter Roeck <linux@roeck-us.net>
Fri, 27 Feb 2026 05:58:12 +0000 (21:58 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Feb 2026 17:01:41 +0000 (09:01 -0800)
commit74badb9c20b1a9c02a95c735c6d3cd6121679c93
treeae1170ebd1df33487fe7f69be7fbc8371823e6d2
parent0eb5965b29989e9e593f502f7c4ef3923141adfd
dpaa2-switch: Fix interrupt storm after receiving bad if_id in IRQ handler

Commit 31a7a0bbeb00 ("dpaa2-switch: add bounds check for if_id in IRQ
handler") introduces a range check for if_id to avoid an out-of-bounds
access. If an out-of-bounds if_id is detected, the interrupt status is
not cleared. This may result in an interrupt storm.

Clear the interrupt status after detecting an out-of-bounds if_id to avoid
the problem.

Found by an experimental AI code review agent at Google.

Fixes: 31a7a0bbeb00 ("dpaa2-switch: add bounds check for if_id in IRQ handler")
Cc: Junrui Luo <moonafterrain@outlook.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://patch.msgid.link/20260227055812.1777915-1-linux@roeck-us.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c