summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorPadmarao Begari <[email protected]>2026-03-27 15:40:32 +0530
committerMichal Simek <[email protected]>2026-04-23 11:49:48 +0200
commita25549d14bce5e3101e9903526c39f7a6fd5e584 (patch)
treeb1f1ed9d0b0f02657b2a1373c55ae64746ebdf1d /scripts/checkpatch.pl
parent54bd858843c33911447329104c906e7fbfd49e03 (diff)
clk: versal: Fix out-of-bounds parent id for DUMMY_PARENT
When a clock parent entry is DUMMY_PARENT (0xFFFFFFFE), masking it with CLK_PARENTS_ID_MASK (0xFFFF) produces the value 0xFFFE (65534). This value is stored in parent->id and later used as a clock array index in versal_clock_get_parentid(). Since clock_max_idx is typically 228, accessing clock[65534] is out-of-bounds, and the garbage value read is used as a clock ID in subsequent clock rate calculations, eventually causing U-Boot to crash. This is observed as a crash during "clk dump" on AMD Versal Gen 2. Fix this by setting parent->id = 0 for DUMMY_PARENT entries. Fixes: 95105089afe2 ("clk: versal: Add clock driver support") Signed-off-by: Padmarao Begari <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions