From nobody Mon Nov 10 01:15:40 2025 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 155246750122029.588047729635605; Wed, 13 Mar 2019 01:58:21 -0700 (PDT) Received: from localhost ([127.0.0.1]:40658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3ziO-00052R-6N for importer@patchew.org; Wed, 13 Mar 2019 04:58:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zg4-0003LJ-VH for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3zY8-0005Vn-L2 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:45 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:37233) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3zY8-0005U9-EH for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:44 -0400 Received: by mail-wr1-x443.google.com with SMTP id y15so990476wro.4 for ; Wed, 13 Mar 2019 01:47:42 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id o18sm37683587wrg.40.2019.03.13.01.47.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 01:47:40 -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 :mime-version:content-transfer-encoding; bh=3xWbK+cf59pdg/jJAcewyR4c1JH0Cz+jH6tRL0PeMMQ=; b=hdLHCEAgbWZMnj6pA85h5G07HUWjQbmJLT7svslAchrQiussB0O5TzC+XZ0ihuTID3 uuFfG5vjYswIU88Yga8jNZ1OhtU1pKlE70yfQ+5/MxJRjjLXk6+cMEHYf+Uou2TtbRVD jHlWVjsIlWFXcT4qMAzG8hK2wFJuPgGM7D0/egkFYOr8XJ34nr1K7ztakecAbM6g5hIz 6+t9YUgESy69PyAns7JxuuJRgwYgHer3i6lLg53WCJ8habJWsKBg9dTEY/Y/Qmjr3nNR FfNBROTxXF6aQDtZOwe6+Ji1+2MbHDlGKiVmdKQhqFRdtYjL4MJZmXKJGW6OANhc07zU DAVw== 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=3xWbK+cf59pdg/jJAcewyR4c1JH0Cz+jH6tRL0PeMMQ=; b=eWIzjjRmL1d+qWN0yX+RdqgmbngRWRKQCz1fgQaYZSBRV5wPPnJvUjR2edkkV2lyP6 Q30DMXGgXvBuXjqKyhLoUWwfb5/moO9NcQXySHFRSxcYbeQ03Dj3G+CPjqSL6qSdAkiA 1TYEY0/uLv494hvfsjLCmYQNXiULct7B8txUSlyRakpNrhRww6wtqWibMUhSRZ2AzUUt f8LPxORqtOdVPCU4yyh673jxVUfcyKercy3AOsGCV22TlI/9DU8ndPfnB0988Cjr1Myu hakTFkkW0nTFxDn7F0knLpQTPb8KbhDLMdLugAjmZfp5qulVrfixFU+mPKuXbrInSC4m BjuA== X-Gm-Message-State: APjAAAWWdTOkptot6xWjLxttIH8o7u8TCrB60/N8Ce/PAfKZPJhmQskO FJS1KrHTNr9CSWeEid92xBTjdKaf X-Google-Smtp-Source: APXvYqw80SeqaSXodRPopqBjaFeh74ojHBQHALIubWHu4YIdclQNMVe2w3nqFHN233ikZhlYQJ5SNg== X-Received: by 2002:adf:f2c9:: with SMTP id d9mr12251430wrp.308.1552466861336; Wed, 13 Mar 2019 01:47:41 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 10:46:48 +0200 Message-Id: <20190313084648.9513-5-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190313084648.9513-1-kamalheib1@gmail.com> References: <20190313084648.9513-1-kamalheib1@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH 4/4] 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: Kamal Heib , Yuval Shaia Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Kamal Heib Reviewed-by: Yuval Shaia --- 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 a0f2b13a2438..d1ca20a3f90d 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.20.1