Re: [PATCH net-next v11 3/4] net: mana: support concurrent HWC requests
From: Wei Hu
Date: Mon Nov 23 2026 - 10:22:15 EST
On Sat, Nov 21, 2026, netdev-bot+sashiko wrote:
> Can this leave a dangling CQ callback for kernel CQs, which then runs on
> freed memory?
Yes. ib_free_cq() can free the CQ even when destroy returns an error.
I removed the v11 early return so the normal CQ teardown withdraws the
callback. This doesn't fix the separate upstream race with a reader of
the RDMA CQ table.
> Can a rejected destroy here leave the driver tracking a QP that the
> RDMA core then frees anyway?
Yes. V12 also drops the QP early return: teardown removes the QP from
the driver's table and CQ lists rather than relying on a retry.
> Does this leak the GIC reference when the rejected command was not the
> EQ disable?
Yes. V12 restores the upstream EQ-create unwind. If creating the EQ
fails, its caller drops the IRQ-context reference; it doesn't use the
HWC error code to decide whether to keep it.
> What releases this retained GIC reference later?
V12 doesn't retain that extra reference on EQ teardown. The last
mana_gd_put_gic() unregisters the handler before freeing a dynamic
MSI-X vector.
> After the continue, what still points to the retained tx_qp[i]?
Nothing in v11 once the parent is freed. V12 keeps the upstream
Ethernet TX, RX and EQ teardown instead of retaining those queues.
At the normal response timeout of a posted HWC command, the PF has
drained DMA to the old queues and packet buffers, as well as interrupt
writes. Unanswered commands haven't taken effect. V12 stops posting on
that HWC and won't accept a handle from a late reply. A reset notice,
a failed post or a wait for a free slot gives no such guarantee. The
HWC's own rings and buffers still require a DESTROY_HWC ack.
Thanks,
Wei
pw-bot: cr