Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp446303iog; Mon, 13 Jun 2022 06:08:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKvuz3RceAZdvjPt2UGH0XIdccEKzut1xaIvEi1HUUZP6i30EwX1CWJoNOPHfbK7U+XQrB X-Received: by 2002:a63:f919:0:b0:401:9f40:2137 with SMTP id h25-20020a63f919000000b004019f402137mr18753650pgi.97.1655125629497; Mon, 13 Jun 2022 06:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125629; cv=none; d=google.com; s=arc-20160816; b=tPUdxPWdyPkXbVbzE7nmBA1ubzr3R9As74UjiSGX8bEXEYfSqmHtUOp5Squ/4eQLxr DxSk9hAcdMEcncQnLgklVHV7By/fVDkqb1dcuEz2PyiLhja4PKOcjkrgl9cVi9u7TbqA KL9K4Ggz3VA/TKUKWCoVqQL8BmN/qC9l53e4R9vykK/v4mRjh5T1MBBO0AtWht/tk+Q6 uZTqPpI2FF6Phca/7HvkioVFSUzSxM86vnN4ahM/27n/06dMIBEeqkLhtT3lAIwCzexF 61MXbWDHJXwTNdiArSUhmL7ENj273bHH9+978816uunTu0EcrhQlfJyUEF9RGpuv14u3 vqBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sMOuZMQKHaxxxByr9fo/ScvSCJS+vPHrQHugzMuDMdk=; b=KsljOWJ8ZgnbdHvz2Z/CholcYJDJ1rslSr+wEAG+XeuNSgqAK7Kz7C7bkuk62ihy+g o6antlU0Si9QCwPHOEL+DEhnb64K7wIOEXvuLBozKDE6OCosg46ElLxnRbb4ywucNAM7 nbOmRcM6ucTEaI2ACTaE3lGQPgkmkThsTd/Nf1gplKX+gxXcM+oBbAtYBvnZkFbxJ2VQ Rg8d6itaBYyBM8aiXMnKrOex3JDCcY6kfTnmCDDJdA3BZ1zgFCc1mrBdk0i/45erT5JR GfT1yroinPdtoovnQSquaH4FKFxZm6U6Kt6ZZlxnBadfikqrLS1lYcygSNHES/T+yYtj 2hsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f8GdETM9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a170902b58e00b00153b2d165d8si8474152pls.480.2022.06.13.06.06.55; Mon, 13 Jun 2022 06:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f8GdETM9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244491AbiFMK0k (ORCPT + 99 others); Mon, 13 Jun 2022 06:26:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245439AbiFMKYl (ORCPT ); Mon, 13 Jun 2022 06:24:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52DFBDEEB; Mon, 13 Jun 2022 03:19:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E24DB60AE6; Mon, 13 Jun 2022 10:19:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA524C34114; Mon, 13 Jun 2022 10:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115545; bh=UXNWwokMFBEXV9YK4jvGcZ5ekW+m7+NpJOTBgQ5x0mQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f8GdETM9jM9Ua8jozdDFeDZnObF4HVA3DlC4g0v5ExDf9fu3DHQYe5wBFbk9ZK9eA hk2Rak73sJrswLxqiYUUC+89lkU+QF5jzRExs50dAFmW/HoF1N6TRsEFNMNNEgbsjV HsF8OKnMl4dv01QZJejyE03J0UVm6Rb4qnilVAXQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiao Yang , Jason Gunthorpe Subject: [PATCH 4.9 105/167] RDMA/rxe: Generate a completion for unsupported/invalid opcode Date: Mon, 13 Jun 2022 12:09:39 +0200 Message-Id: <20220613094905.390238755@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiao Yang commit 2f917af777011c88e977b9b9a5d00b280d3a59ce upstream. Current rxe_requester() doesn't generate a completion when processing an unsupported/invalid opcode. If rxe driver doesn't support a new opcode (e.g. RDMA Atomic Write) and RDMA library supports it, an application using the new opcode can reproduce this issue. Fix the issue by calling "goto err;". Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20220410113513.27537-1-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/sw/rxe/rxe_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -677,7 +677,7 @@ next_wqe: opcode = next_opcode(qp, wqe, wqe->wr.opcode); if (unlikely(opcode < 0)) { wqe->status = IB_WC_LOC_QP_OP_ERR; - goto exit; + goto err; } mask = rxe_opcode[opcode].mask;