From patchwork Thu Nov 22 23:24:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10694973 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DFEE13B5 for ; Thu, 22 Nov 2018 23:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F081C2BF0F for ; Thu, 22 Nov 2018 23:24:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E47832C2F0; Thu, 22 Nov 2018 23:24:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91C612BF0F for ; Thu, 22 Nov 2018 23:24:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407877AbeKWKGD (ORCPT ); Fri, 23 Nov 2018 05:06:03 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46500 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389637AbeKWKGD (ORCPT ); Fri, 23 Nov 2018 05:06:03 -0500 Received: by mail-pl1-f194.google.com with SMTP id t13so9786678ply.13 for ; Thu, 22 Nov 2018 15:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BZQr5HeVODM40YLLTiCLxuWMnX3brO18XbPQTTqt4ME=; b=ZvJMN95Np6vYXz4ZKumaX2eyf+dNIqPO4A4Ho3ye4VkmHFfDrMt2GKYFevIXon7bjr KYafoqdm0/+F3fD7xNdI6kpKaKx9CX0zMJw1MoYIe1RT8A9NM2QJp8K77bzNnrBhHzo/ OYH2VdBKUEpDa3hHNJlXZc+DiqJndQxfYxve/DMV8htUMlmj95KjRefeCAwWnxS0oUW3 lQzU0gzUEnygGI8pd8PmgfNK3Ng4nUeeIGaAVWPpCB5IFcXMCFbgLU0XJnNwT5c4AhgD 3oGzJvc7I3sXCkgX+E6Mopgj7B0GCx2hnDSTv01FLGAOZgFZajncet3bUTTbVGzhxva6 znig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BZQr5HeVODM40YLLTiCLxuWMnX3brO18XbPQTTqt4ME=; b=acVfPshwXyqt2o3qUJd3MEvNz5X/ZP9cWebatu/BOtPnQnRMe8dPyeDWEkEpTfFx64 OqexHR9otcdYUY0vTPLike4Zgc86Wsu8eQg1LMNM5r2+JZeJg01Dlpg39/4wBMRlSBed pIof0MyCETOXz9ktEK9XNwWn91JT4MojCD175ShSPhWYdw4yRH845+au/YXMGVElVVTf CNDibOfoswPyMg9n5TF0S/Lu+wvm0TUTpeLSnPqUTa8vRroh6xl0+76cQ/evmbs7OlWe cuJmxsewMsRj7UrKImECIZFqIb7HciwhIJXP8y4gyk3iIC0Mxub36F/GGFk1JdgM63pl 9dMg== X-Gm-Message-State: AA+aEWaCdgE4PHpLw1H/IENrdzLKNW9MXe/6sUl+C1w5Xw4bo959TVNc sIwgPgcfqk7CAxBriVKyujUEBd2Ul7g= X-Google-Smtp-Source: AFSGD/Vk+xLxWeXU2pIEODXIG1xZTCinq6vwj+P62vkY1rqXNcyPsrZKemjt7daSBQX11yWB8qrDdA== X-Received: by 2002:a17:902:50e:: with SMTP id 14mr5081221plf.141.1542929060428; Thu, 22 Nov 2018 15:24:20 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id j6sm23388921pfg.126.2018.11.22.15.24.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Nov 2018 15:24:19 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gPyKY-0007sK-99; Thu, 22 Nov 2018 16:24:18 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 01/10] verbs: Fix wrong command structure usage Date: Thu, 22 Nov 2018 16:24:07 -0700 Message-Id: <20181122232416.30132-2-jgg@ziepe.ca> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122232416.30132-1-jgg@ziepe.ca> References: <20181122232416.30132-1-jgg@ziepe.ca> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe Several places were using the wrong command buffer type for the command being executed. It turns out none of these are bugs since both structs have identical members and layouts, but it causes the type checking in later patches to get angry. Signed-off-by: Jason Gunthorpe --- libibverbs/cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c index d88b3aa816eac4..af6ea5cfe12a0f 100644 --- a/libibverbs/cmd.c +++ b/libibverbs/cmd.c @@ -1425,7 +1425,7 @@ int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, struct ibv_recv_wr **bad_wr) { struct ibv_post_recv *cmd; - struct ib_uverbs_post_send_resp resp; + struct ib_uverbs_post_recv_resp resp; struct ibv_recv_wr *i; struct ib_uverbs_recv_wr *n, *tmp; struct ibv_sge *s; @@ -1486,7 +1486,7 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr, struct ibv_recv_wr **bad_wr) { struct ibv_post_srq_recv *cmd; - struct ib_uverbs_post_recv_resp resp; + struct ib_uverbs_post_srq_recv_resp resp; struct ibv_recv_wr *i; struct ib_uverbs_recv_wr *n, *tmp; struct ibv_sge *s; @@ -1841,7 +1841,7 @@ int ibv_cmd_create_flow(struct ibv_qp *qp, size_t ucmd_size) { struct ibv_create_flow *cmd; - struct ib_uverbs_destroy_flow resp; + struct ib_uverbs_create_flow_resp resp; size_t cmd_size; size_t written_size; int i, err;