Re: [PATCH] staging: octeon: unwind receive initialization on IRQ failure
From: Greg KH
Date: Thu Nov 05 2026 - 06:28:27 EST
On Thu, Nov 05, 2026 at 04:36:28PM +0800, Tian Xuechen wrote:
> cvm_oct_rx_initialize() returns immediately when request_irq() fails.
> The failing receive group has already had its NAPI instance added and
> enabled, and earlier selected groups can still have registered IRQ
> handlers and active NAPI instances.
>
> When RX initialization fails, cvm_oct_probe() unwinds and returns an
> error. The driver core then releases the managed platform data, even
> though earlier RX IRQ actions still reference NAPI instances embedded
> in that data.
>
> Disable and delete NAPI for the failing group, then unwind the previously
> initialized groups in reverse order. Mask their POW interrupts, disable
> and delete their NAPI instances, and free their IRQs before returning the
> original error.
>
> Fixes: ae4350364008 ("staging: octeon: Propagate rx initialization failures")
> Signed-off-by: Tian Xuechen <202300460064@xxxxxxxxxxxxxxx>
> ---
> An AI coding assistant helped analyze the RX error path, draft the
> unwind, and edit the changelog.
Please read: https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh