summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorQingshuang Fu <fuqingshuang@kylinos.cn>2026-06-18 05:13:52 +0300
committerThomas Gleixner <tglx@kernel.org>2026-06-22 19:09:56 +0300
commit37738fdf2ab1e504d1c63ce5bc0aeb6452d8f057 (patch)
tree22f81a45101b14b6ac4b3f74ea6d801c4e6597ad /scripts
parenta1074dd62faa6572921d387e8a21589ccea00efc (diff)
downloadlinux-37738fdf2ab1e504d1c63ce5bc0aeb6452d8f057.tar.xz
irqchip/imgpdc: Fix resource leak, add missing chained handler cleanup on remove
The driver allocates domain generic chips using irq_alloc_domain_generic_chips() during probe and sets up chained handlers using irq_set_chained_handler_and_data(). However, on driver removal, the generic chips are not freed and the chained handlers are not removed. The generic chips remain on the global gc_list and may later be accessed by generic interrupt chip suspend, resume, or shutdown callbacks after the driver has been removed, potentially resulting in a use-after-free and kernel crash. The chained handlers that were installed in probe for peripheral and syswake interrupts are also left dangling, which can lead to spurious interrupts accessing freed memory. Fix these issues by: - Setting IRQ_DOMAIN_FLAG_DESTROY_GC flag in domain->flags, so the core code automatically removes generic chips when irq_domain_remove() is called - Clearing all chained handlers with NULL in pdc_intc_remove() Fixes: b6ef9161e43a ("irq-imgpdc: add ImgTec PDC irqchip driver") Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260618021352.661773-1-fffsqian@163.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions