Re: [PATCH] RDMA/rtrs-clt: Don't WARN on unexpected info-response opcode
From: Jason Gunthorpe
Date: Mon Sep 28 2026 - 14:41:42 EST
On Mon, Sep 21, 2026 at 09:25:25PM -0700, Quanye Yang wrote:
> From: Quanye Yang <quanyeyang@xxxxxxxxx>
>
> The info-response receive is posted for a SEND. The completion
> opcode comes from the peer, so RDMA WRITE with Immediate is a
> legal WC on that WQE even though it violates the RTRS handshake.
>
> WARN_ON(wc->opcode != IB_WC_RECV) treats that peer-controlled
> field as an internal invariant and panics with panic_on_warn.
> Treat a non-SEND completion as a handshake failure: log it and
> keep the existing CONNECTING_ERR cleanup.
>
> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
> Reported-by: Farhad Alemi <farhad.alemi@xxxxxxxxxxxx>
> Link: https://lore.kernel.org/linux-rdma/CA+0ovCge-K+hcGHXZ4R3Ww5+cg159uxHBeVbKeUSLBRSMT8OWA@xxxxxxxxxxxxxx
> Signed-off-by: Quanye Yang <quanyeyang@xxxxxxxxx>
> Reviewed-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-clt.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Applied to for-next
Thanks,
Jason