summaryrefslogtreecommitdiff
path: root/tools/lib/python/__init__.py
diff options
context:
space:
mode:
authorKarl Mehltretter <kmehltretter@gmail.com>2026-09-27 21:13:59 +0200
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2026-10-13 19:00:29 +0200
commit014aa19e4f25163ba7862c5b4635b5f1d01b0613 (patch)
tree880b7203cdf883c73bbdbda9b3a71359f8524eac /tools/lib/python/__init__.py
parent3f20b3bdca339469cb3880ab682645f70c147d5e (diff)
downloadlinux-next-014aa19e4f25163ba7862c5b4635b5f1d01b0613.tar.gz
linux-next-014aa19e4f25163ba7862c5b4635b5f1d01b0613.zip
sh: intc: Sort the prio and sense lists after filling them
register_intc_controller() sorts d->prio and d->sense right after allocating them, with hw->nr_prio_regs and hw->nr_sense_regs as the element count. The lists hold hw->nr_vectors entries and are only filled later, by intc_register_irq(). On SH7785, sh7785-irq0123 and sh7785-irq4567 have four vectors but the SoC's eleven priority registers, so sort() swaps 88 bytes in a 32 byte kmalloc object at boot. slub_debug=FZPU reports "Right Redzone overwritten" in kmalloc-32, and v6.5 and v6.6 panic in __kmem_cache_alloc_node() while registering sh7785-irq0123. Found with a custom QEMU model of the SH7785LCR. On it, v6.4 sh7785lcr_defconfig boots with SLAB, the defconfig default before v6.5, and hangs before the console is up when built with SLUB. Sort the lists once all vectors are registered, with the number of entries that were added. Fixes: b59f9f9775e6 ("sh: intc: optimize intc IRQ lookup") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Diffstat (limited to 'tools/lib/python/__init__.py')
0 files changed, 0 insertions, 0 deletions