From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2120.oracle.com ([156.151.31.85]:47004 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933915AbeF0QcK (ORCPT ); Wed, 27 Jun 2018 12:32:10 -0400 Date: Wed, 27 Jun 2018 19:31:50 +0300 From: Yuval Shaia To: Bart Van Assche Cc: Jason Gunthorpe , Doug Ledford , linux-rdma@vger.kernel.org, Zhu Yanjun , Jianchao Wang , stable@vger.kernel.org Subject: Re: [PATCH v2] RDMA/rxe: Set wqe->status correctly if an unexpected response is received Message-ID: <20180627163150.GA9553@lap1> References: <20180626153936.9576-1-bart.vanassche@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626153936.9576-1-bart.vanassche@wdc.com> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Jun 26, 2018 at 08:39:36AM -0700, Bart Van Assche wrote: > Every function that returns COMPST_ERROR must set wqe->status to > another value than IB_WC_SUCCESS before returning COMPST_ERROR. Fix > the only code path for which this is not yet the case. It is unclear to me why other places left out from this fix (e.x. lines 248, 288 etc). > > Signed-off-by: Bart Van Assche > Cc: Zhu Yanjun > Cc: Jianchao Wang > Cc: Yuval Shaia > Cc: > --- > > Changes compared to v1: left out a pr_err() statement as requested by Jason. > > drivers/infiniband/sw/rxe/rxe_comp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c > index 98d470d1f3fc..83311dd07019 100644 > --- a/drivers/infiniband/sw/rxe/rxe_comp.c > +++ b/drivers/infiniband/sw/rxe/rxe_comp.c > @@ -276,6 +276,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp, > case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE: > if (wqe->wr.opcode != IB_WR_RDMA_READ && > wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV) { > + wqe->status = IB_WC_FATAL_ERR; > return COMPST_ERROR; > } > reset_retry_counters(qp); > -- > 2.17.1 >