From nobody Mon Feb 9 04:45:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155274778323583.46791208859224; Sat, 16 Mar 2019 07:49:43 -0700 (PDT) Received: from localhost ([127.0.0.1]:42751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5Ad2-0004cX-Ar for importer@patchew.org; Sat, 16 Mar 2019 10:49:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5AOq-0001Ag-U3 for qemu-devel@nongnu.org; Sat, 16 Mar 2019 10:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5AOp-0000mi-2N for qemu-devel@nongnu.org; Sat, 16 Mar 2019 10:35:00 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43747) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5AOn-0000kn-5S for qemu-devel@nongnu.org; Sat, 16 Mar 2019 10:34:57 -0400 Received: by mail-wr1-x441.google.com with SMTP id d17so12434465wre.10 for ; Sat, 16 Mar 2019 07:34:55 -0700 (PDT) Received: from localhost.localdomain ([176.228.155.165]) by smtp.gmail.com with ESMTPSA id l8sm7518895wrv.45.2019.03.16.07.34.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Mar 2019 07:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T4GbmStQjw3b/srtuKEb66FbSGwG9b8IChWP/lxtFmg=; b=Otp1lnCSNlNZR2zdA7RQ+1fu9gsaRQGtR0iDG3GmClxNMjfqFgtGkx8XxVF2wIwmuQ UOzfshp3OzLq22w/dC3Fq7mJrCQ0yl822iynUxFmk3I4sqfqDTO2sIICSQFXMdE7BO4L PWFrUNElnrerfFulujPZhafis39Uq6iFlCNHQybKFPGTpQM+dJ1jey+OLgZiwYw8qFy6 JT1Ii8W4yo1yz/+KiYsylth65et2EPkDwUlSuFki1k1ehDY2Ky2RQZFNO/gtqp0LCx9X ZYrQ6tdRRL8uJnOSu0Eifp1RNVK7Yy7JeV+J8Iy1XPNwr+wZLuMUeEjsS61MdYx6tM76 S4aA== 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; bh=T4GbmStQjw3b/srtuKEb66FbSGwG9b8IChWP/lxtFmg=; b=V5ZMaczXZ9y4d4kAOZl5QU35Tw0saab96ifmYqWgcAU1hsO7Mg7Y7v+SuPro8daSGq 64BhIRJ1Gf/D5zTfSz2dT3om1QA7fvSwB5oOo1VXZgip6hjN/28mFyDlHsxrZ+X6LBIY mHxod/YzGnI31E8TBo9gcRUUr4p+AMEdyPD3cRS9tYAANUZ+CONoFE+7NPjdo9KSXD8R taBkrXapMQyltnZCnc5FdLIxfESlAvEMnqE0CJIj7kvrSsg9v172X2bQvF5EvPMlWqGr vQ8Z+e4YoNSsypQzOcGBlnCyrAHdQbmv2XNHsWFZGeoI9V56W7pVNmfEqLu2JZ9JQqYa XS0A== X-Gm-Message-State: APjAAAX0Div6o+fKDP/7UEeZq3hAhS77UhjDUPO4TtMlvcFBIQ8OhuxF 8GqXYPBliLNLjEpLTHlt44XMgSzn X-Google-Smtp-Source: APXvYqzWi89JyScUXIxfEVdze1KmJM6xD5OSV7bmE7+mbl39ez3rq3KePLtTomnSqMRvHBWi/1kjnw== X-Received: by 2002:adf:e58f:: with SMTP id l15mr5864198wrm.309.1552746894424; Sat, 16 Mar 2019 07:34:54 -0700 (PDT) From: Marcel Apfelbaum To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sat, 16 Mar 2019 16:34:20 +0200 Message-Id: <20190316143421.8194-18-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190316143421.8194-1-marcel.apfelbaum@gmail.com> References: <20190316143421.8194-1-marcel.apfelbaum@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH PULL 17/18] hw/pvrdma: Fix zero-initialization of resp in {query/modify}_qp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, kamalheib1@gmail.com, yuval.shaia@oracle.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kamal Heib Make sure to zero-initialize only the pvrdma_cmd_query_qp_resp and not the whole pvrdma_cmd_resp for query_qp, in modify_qp the resp isn't used so remove it. Reviewed-by: Yuval Shaia Signed-off-by: Kamal Heib Message-Id: <20190314153031.7197-5-kamalheib1@gmail.com> Signed-off-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index b682e919d5..be8c2b61c9 100644 --- a/hw/rdma/vmw/pvrdma_cmd.c +++ b/hw/rdma/vmw/pvrdma_cmd.c @@ -488,8 +488,6 @@ static int modify_qp(PVRDMADev *dev, union pvrdma_cmd_r= eq *req, struct pvrdma_cmd_modify_qp *cmd =3D &req->modify_qp; int rc; =20 - memset(rsp, 0, sizeof(*rsp)); - /* No need to verify sgid_index since it is u8 */ =20 rc =3D rdma_rm_modify_qp(&dev->rdma_dev_res, &dev->backend_dev, @@ -512,7 +510,7 @@ static int query_qp(PVRDMADev *dev, union pvrdma_cmd_re= q *req, struct ibv_qp_init_attr init_attr; int rc; =20 - memset(rsp, 0, sizeof(*rsp)); + memset(resp, 0, sizeof(*resp)); =20 rc =3D rdma_rm_query_qp(&dev->rdma_dev_res, &dev->backend_dev, cmd->qp= _handle, (struct ibv_qp_attr *)&resp->attrs, cmd->attr_ma= sk, --=20 2.17.1