From patchwork Wed Oct 1 11:49:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Droneaud X-Patchwork-Id: 5011431 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C1F2C9F375 for ; Wed, 1 Oct 2014 11:56:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8C9920155 for ; Wed, 1 Oct 2014 11:56:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 079912014A for ; Wed, 1 Oct 2014 11:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308AbaJAL4z (ORCPT ); Wed, 1 Oct 2014 07:56:55 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:51452 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146AbaJAL4y (ORCPT ); Wed, 1 Oct 2014 07:56:54 -0400 Received: from localhost.localdomain (unknown [37.163.159.60]) by smtp3-g21.free.fr (Postfix) with ESMTP id 1E27BA6303; Wed, 1 Oct 2014 13:56:19 +0200 (CEST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.8/8.14.8) with ESMTP id s91Bshaj013350; Wed, 1 Oct 2014 13:55:50 +0200 Received: (from ydroneaud@localhost) by localhost.localdomain (8.14.8/8.14.8/Submit) id s91Bou73013038; Wed, 1 Oct 2014 13:50:56 +0200 From: Yann Droneaud To: Roland Dreier Cc: linux-rdma@vger.kernel.org, Dotan Barak , Yann Droneaud , Sean Hefty , Yishai Hadas Subject: [PATCH libibverbs 6/9] ibv_cmd_open_qp(): initialize reserved field in struct ibv_open_qp Date: Wed, 1 Oct 2014 13:49:36 +0200 Message-Id: <560f1909a3d7db2fffd57c5da4954ebde7f4223c.1412163687.git.ydroneaud@opteya.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Properly initialize data structure exchanged with kernel uverbs layer: - may remove valgrind spurious warnings; - may allow to use the field later for future expansion. Link: http://marc.info/?i=cover.1412163687.git.ydroneaud@opteya.com Fixes: 5f5292bbc51fb ('Add ibv_open_qp() for XRC receive QPs') Cc: Sean Hefty Cc: Yishai Hadas Signed-off-by: Yann Droneaud --- src/cmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd.c b/src/cmd.c index f80ce4d30832..f9e4a03fd84d 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -785,6 +785,7 @@ int ibv_cmd_open_qp(struct ibv_context *context, struct verbs_qp *qp, cmd->pd_handle = xrcd->handle; cmd->qpn = attr->qp_num; cmd->qp_type = attr->qp_type; + memset(cmd->reserved, 0, sizeof(cmd->reserved)); if (write(context->cmd_fd, cmd, cmd_size) != cmd_size) return errno;