Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2193254iof; Tue, 7 Jun 2022 22:46:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9rq+tW4Uu1gvLNTCwEf2qyDbSAVH+vc8iEJVJrJuWpSkrgVbu714qTh90S5H3rDyVMzf9 X-Received: by 2002:a17:90b:1d06:b0:1e6:7a84:3c6e with SMTP id on6-20020a17090b1d0600b001e67a843c6emr36327928pjb.202.1654667207931; Tue, 07 Jun 2022 22:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667207; cv=none; d=google.com; s=arc-20160816; b=Jd9/L2811f1WLPXNIAiCfULO8tG1NHY1+kSY1zT4nE75bIbqNzHDxAryByhLMOEwjM Uy8+fUrsvDxIirBInPGGLlDMM+lLzzAk/F8f1ykhZJrd7YVdjw06+fxXRhQ5735BpXZF lLPu8faQEhmT2nWCVNZ7F8wv62gy72ubSjK2XjR/G9JtFNkM9lkszHqzzIjdjukCY2Rf 6447yorabbEYCxwJsfog8Gdck5XoQRAdUn+HgFLmx+SgQzGeS3RnZQyh7wEpQWSGwh+T DwGBfTpH3VbKySnhtJD1t1+IGF5EOgazQtzOoJXKJRmX4G2ZBI+X9EtAK1HcvMSEWZPB X4AQ== 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=exHgwv3WeBtoO2yz37OLsT61U2rS07n3fK9tCRpp0Uw=; b=bADo7R7+Yru3O0uozGKnT4zhkO/LhDxi/6FevosFQj8K6kcpOSS4GL0p4aOfO//Mip WI0SRCbCgl9sUmxzFQQZrQoM/4Tvo4wGnPImhVZDnBfRvl3oC+Kvkpyl9Lc1fnLCbrqR zltJ0eZL7vlxrNd8xZl2OS9qQrEYvzqddFJXdUYrRpetmWFo6v21KCsOifhQUuSEZjLT gg21VxrYMx+vg5UAuKBqk7X+xVSyyVtK++rFgWckl9pN0PSDGoyN2RcCkTMTicoRO+FN u+uYRHfMggFgqckufi5vHIogi/+r+iWqS1XvucVKo0eZUHWGN0xrLrxBlLTs5qDAXmG7 Ygog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1LN3yKOp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k13-20020a056a00134d00b0051c44065606si4243028pfu.357.2022.06.07.22.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:46:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1LN3yKOp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B5F63CD2A1; Tue, 7 Jun 2022 22:11:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbiFHA1l (ORCPT + 99 others); Tue, 7 Jun 2022 20:27:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381274AbiFGWcT (ORCPT ); Tue, 7 Jun 2022 18:32:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C7E027C25E; Tue, 7 Jun 2022 12:25:36 -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 CC8EC609D0; Tue, 7 Jun 2022 19:25:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCF4BC385A2; Tue, 7 Jun 2022 19:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629935; bh=FxSYe1AzQYvUcxMa1izcvVIzUUdLyz/bSiRT/8U0Heo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1LN3yKOphaYNFCyoDhSwWej6+zCi99owfqYUwUBM3l0mHcJF8E4fv8CfrFzeF9dBR leWd0hPBBE7WVbrVEQVNpdFbU34pInOch+eQFxVK0IOit/U8u/jngCi0WZqMfjKhTC 5fy7uj2trER11KFvHjQyBqP4fz2RUXA9a6m+9zS0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiao Yang , Jason Gunthorpe Subject: [PATCH 5.18 870/879] RDMA/rxe: Generate a completion for unsupported/invalid opcode Date: Tue, 7 Jun 2022 19:06:28 +0200 Message-Id: <20220607165028.107351566@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 @@ -661,7 +661,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;