Re: [PATCH v2 09/14] NTB: ntb_transport: Drain RX tasklets during link cleanup
From: Logan Gunthorpe
Date: Fri Sep 18 2026 - 12:13:09 EST
On 2026-09-09 22:08, Koichiro Den wrote:
> ntb_qp_link_cleanup() cancels QP link work but does not wait for the RX
> tasklet. The tasklet can still be processing the ring while cleanup
> resets the QP, and transport link cleanup can free the MW before the
> tasklet finishes.
>
> Clear active under rx_sched_lock and drain the tasklet before resetting
> the QP. Temporarily disable QP link work so a concurrent client link-up
> request cannot reactivate RX during cleanup, then re-enable it for the
> existing link setup paths.
>
> This does not drain RX DMA transfers or their completion callbacks.
>
> Fixes: 9143595a7e05 ("NTB: ntb_transport: Free MWs in ntb_transport_link_cleanup()")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>
Looks good.
Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>