From patchwork Tue Dec 17 16:48:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3362851 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 41D479F344 for ; Tue, 17 Dec 2013 16:58:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3131E2031C for ; Tue, 17 Dec 2013 16:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 162F920382 for ; Tue, 17 Dec 2013 16:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754886Ab3LQQ63 (ORCPT ); Tue, 17 Dec 2013 11:58:29 -0500 Received: from mtv-iport-4.cisco.com ([173.36.130.15]:8556 "EHLO mtv-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872Ab3LQQ62 (ORCPT ); Tue, 17 Dec 2013 11:58:28 -0500 X-Greylist: delayed 573 seconds by postgrey-1.27 at vger.kernel.org; Tue, 17 Dec 2013 11:58:27 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=785; q=dns/txt; s=iport; t=1387299508; x=1388509108; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=lE2mtWvHfpsk70YD4ksfIEoAD0MpUtYcUNiq3QUP9Ro=; b=kQvCHe4dqQ8FHUNY3t+wLBI0dYoefmfal8eYHDDTMkO5+Jx44IGnpmlk bCr4gcW3eAtTYPpfCTBhMl8raFp/eEhMB6KXY0rBl5cpQluhGre1lMk7m 8YqyUnt831/lLM+AzJEeVysq0kwI2W2+qUwkhKy/cuOvFiQvLQ/L8Ww4t I=; X-IronPort-AV: E=Sophos;i="4.95,502,1384300800"; d="scan'208";a="100782425" Received: from mtv-core-4.cisco.com ([171.68.58.9]) by mtv-iport-4.cisco.com with ESMTP; 17 Dec 2013 16:49:04 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id rBHGn3wD021253; Tue, 17 Dec 2013 16:49:03 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id B19223F7DB; Tue, 17 Dec 2013 08:49:03 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 6/9] IB/usnic: Initialize all of the data returned to userspace Date: Tue, 17 Dec 2013 08:48:34 -0800 Message-Id: <1387298917-7365-7-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387298917-7365-1-git-send-email-umalhi@cisco.com> References: <1387298917-7365-1-git-send-email-umalhi@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 The reserved fields in usnic_ib_create_qp_resp are returned to userspace uninitialized. Set these to 0. Signed-off-by: Upinder Malhi --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c index e19ca90..9f0945a 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c @@ -49,6 +49,8 @@ static int usnic_ib_fill_create_qp_resp(struct usnic_ib_qp_grp *qp_grp, struct usnic_vnic_res_chunk *chunk; int i, err; + memset(&resp, 0, sizeof(resp)); + us_ibdev = qp_grp->vf->pf; pdev = usnic_vnic_get_pdev(qp_grp->vf->vnic); if (!pdev) {