Fwd: Serious bug in rxe_resp.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





-------- Forwarded Message --------
Subject: Serious bug in rxe_resp.c
Date: Sun, 28 Mar 2021 23:17:18 -0500
From: Bob Pearson <rpearsonhpe@xxxxxxxxx>
To: Jason Gunthorpe <jgg@xxxxxxxxxx>, Zhu Yanjun <zyjzyj2000@xxxxxxxxx>, linux-rdma@xxxxxxxxxxxxxx

Currently all the error cases in the responder where the spec requires the responder to send an ack with an appropriate
syndrome fail to do so for opcodes which do not consume a receive WQE. In the state machine these error states go to the
COMPLETE state which immediately goes to the CLEANUP state and then to the DONE state and then exits the state machine.

I have a work around which is probably OK but I need to do some more checking to make sure that it complies with the IBA.
Comparing to the code at the end of do_complete it looks like the right way to do this is

int do_complete(...)
{
        .....

        if (!wqe)
                goto done;        // jump to bottom of do_complete()

        ....

done:
        if (!pkt)
		....
	else if (qp_type(qp) == IB_QPT_RC)
		return RESPST_ACKNOWLEDGE;
	else
		return RESPST_CLEANUP;
}

This bug was exposed by error test cases for ibv_rereg_mr() which expect to get a NAK.

bob



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux