* Re: [PATCH 1/2] RDMA/core: Untrack resources before driver destroy
[not found] <6a7affe3.26268144.122abf.417fSMTPIN_ADDED_BROKEN@mx.google.com>
@ 2026-08-11 14:18 ` Jason Gunthorpe
0 siblings, 0 replies; only message in thread
From: Jason Gunthorpe @ 2026-08-11 14:18 UTC (permalink / raw)
To: Yili Zhang; +Cc: leon, linux-rdma, linux-kernel
On Tue, Aug 11, 2026 at 06:56:22PM +0800, Yili Zhang wrote:
> From: Yili Zhang <zhangyili01@baidu.com>
>
> When a userspace RDMA object cannot be destroyed by the driver during
> ib_uverbs_close() (e.g. mlx5 destroy_cq/destroy_qp fails because the
> hardware is in a transient error state),
That's a bug in of itself, if the HW is erroring then the destroy
should wait for the error to progress past flr and then let the
destroy continue.
> Fix it by moving rdma_restrack_del() to *before* the driver's destroy
> callback, so the restrack entry is removed at the moment we commit to
> destroying the object rather than only on success.
No, that messes up legitimate cases where the destroy is allowed to
fail.
AFAICT the issue here is the netlink is not allowed to access the
context without proper locking.
Jason
^ permalink raw reply [flat|nested] only message in thread