Re: [PATCH 06/10] mailbox: qcom-ipcc: Remove IRQ domain via devm to avoid ISR use-after-free

From: Konrad Dybcio

Date: Thu Dec 03 2026 - 05:39:49 EST


On 12/3/26 9:28 AM, Lee Jones wrote:
> qcom_ipcc_probe() registers qcom_ipcc_irq_fn() using devm_request_irq(),
> but qcom_ipcc_remove() manually removes ipcc->irq_domain before devres
> frees the interrupt. If an interrupt fires during unbind,
> qcom_ipcc_irq_fn() dereferences the freed IRQ domain.
>
> Register irq_domain_remove() via devm_add_action_or_reset() immediately
> after irq_domain_create_tree() and drop qcom_ipcc_remove() so devres
> tears down the IRQ, mailbox controller, and IRQ domain in strict reverse
> order.
>
> Fixes: fa74a0257f45 ("mailbox: Add support for Qualcomm IPCC")
> Closes: https://sashiko.dev/#/bug/linux-f9f9c7a3-ce00-42b7-9a78-843c2f3712eb
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad