From patchwork Thu Jan 19 21:20:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 9526945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 12FF860437 for ; Thu, 19 Jan 2017 21:39:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05478285AA for ; Thu, 19 Jan 2017 21:39:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE2082865B; Thu, 19 Jan 2017 21:39:05 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 DBCA128658 for ; Thu, 19 Jan 2017 21:39:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751659AbdASVjD (ORCPT ); Thu, 19 Jan 2017 16:39:03 -0500 Received: from mail-sn1nam02on0057.outbound.protection.outlook.com ([104.47.36.57]:57888 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751510AbdASVjB (ORCPT ); Thu, 19 Jan 2017 16:39:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zw/GcMSVyEsbheVerwZkdFo+CLbu0o1F3IzdbIKEJB4=; b=i9TvIMPR9xrj9ujyhTmVkIyHos/5c9HVahP1d9mP+xS6o6pibqcXOBz/xQ0cAquASlCMpQfxiRQF3W05kv2IgksPPU+Hhv37QGNco62trgvuztgqmXcjezkreQb5b7o5/qKOs0y1JMpghhhSlmzvhF9mDvnqNuVbR1ETWwrv8+U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; Received: from promb-2s-dhcp95-136.eng.vmware.com (208.91.1.34) by DM2PR0501MB843.namprd05.prod.outlook.com (10.242.115.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.6; Thu, 19 Jan 2017 21:21:10 +0000 From: Adit Ranadive To: , , CC: Adit Ranadive Subject: [PATCH 1/2] IB/vmw_pvrdma: Don't leak info from alloc_ucontext Date: Thu, 19 Jan 2017 13:20:39 -0800 Message-ID: <3c91d92f4200f3c7844a198c25f2ce49f468b189.1484859556.git.aditr@vmware.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: CY4PR13CA0039.namprd13.prod.outlook.com (10.173.156.153) To DM2PR0501MB843.namprd05.prod.outlook.com (10.242.115.149) X-MS-Office365-Filtering-Correlation-Id: 4b7f7e77-c990-46b9-3b8f-08d440b11738 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0501MB843; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB843; 3:WOpiDQgJaEO1EFe+rN3cDGPJHaC/7ycQCS8YZI108Cxxzb0B1JPgnQ+OggH+NTXK8V6eq+9M6YX87IrlQZdUBrf29yqR+Uh90yCv5QFS9g2Q2tjyHiBXm0/vDS8QyPLKXCF07QbEbgZPiUIntp9KO5mlm7RPtquCZUxM9xjMoaS5EZAuSI3NsWqaVejp/Pz3FYhQo0OMHGRMN5iKRb3b2XTt7IRt0A8XLO2UYd2pqmULTj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FS55gT5Q0mu2ozBPlA9krUDg+nuwT6zrRlC9izd4WGerNPwwsWNeacOKybwfkIrxzkw7+Ew4DRgnUaPZKyfg9hpxirwVLpC+lzVJBbSEI20ve/n7rcyhlZTY3s/vMOhSBehUf5gozVn05h/W6f/WIckiMIrHA+aF4PrlzqF8IPVEzFTMoLiE7qmBCPFK/BbkiEuGlrz6GsAda8iPJahG5M4vY4CXb+AAKSCSpjd2XqWi3g/BnEd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:DM2PR0501MB843; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0501MB843; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB843; 4:O2wKrtbBF6A7y42vvEB6vtqNnF0hACmgzYrFDHGm5HP5eTkeH41xaKosFKfgk/mpaEO4T3sgBNds59Cw0M8Khl39NBPk25RqKzHkRNAFpfztKZcxZ4riadHLeLQ8RgnmaqGLyHewqhXhdorvsLkPDcphmr5qrX3gUL20bGLP5i3K8ktq4xgSpOqK6m+Ab9AQ3jOdqgrzzaFg69pqjOOeaayJvSHeq/+Z6w33DYYApeSDDd0kOrAsUXTzoHmgcVOY58xhC/ZpQOZxYEbmTGzEqbFNterCqs8+Yg91D2J+SWPKy0ozuYjDQqY0qEhbvx9m3CEhq2LztymYNy3p/5jkGKtJr71ednPsp9LmofkqmfA9+iKm+ZKM44QjdIuCXS1vszfMK5cjpfKDLW4yp/b7+EoD2ClKSeHrJXarWK6KXmx+nmjU3jtj01mf4l8tbKR9tit4Z8TiI8ln8pmGuq2rzmo5Z03t56Lj4rmhNJ/zvGlv4pMgkEoZlDEBcwY+2GQ6EtHCGst7/qj2+DgnrkG1XQBSew2kBVkvKNe90OQGXpsd8uqNGcFiiG9NZrK8RyGlOema0B9xhxQ1hkIreABXAcN5tkznMsuJvaOhj/bcpR+3X1LSWNbsuTMTOEKcmKrMXDrxMODplvXAYpGR9CAWLA== X-Forefront-PRVS: 0192E812EC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(107886002)(50226002)(50986999)(33646002)(4326007)(76176999)(5001770100001)(6116002)(97736004)(3846002)(81156014)(53936002)(48376002)(66066001)(4001430100002)(50466002)(8676002)(92566002)(189998001)(5003940100001)(101416001)(36756003)(118296001)(25786008)(38730400001)(105586002)(68736007)(106356001)(86362001)(42186005)(2201001)(305945005)(7736002)(47776003)(6486002)(81166006)(6636002)(2906002)(2950100002)(6666003)(6862003)(5660300001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0501MB843; H:promb-2s-dhcp95-136.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0501MB843; 23:i9khpLZeb2M5hO8Kf+Wl3d9tJszyUw0f+JyIxl1X?= =?us-ascii?Q?32/mybx3n2NGpVhVNK1Y8ig9tU/UrGEOVTYR152ZXOc26/6fL4oPM7hPgFBP?= =?us-ascii?Q?XyTaUikgn1Ie9pNE3nSbcRRO8QtvpRf0yKp+UqE2PjIyVZQ+LG9SxcAw6kh5?= =?us-ascii?Q?5QfvcvfF+cTYu+A7FKPFSPVbqNtL5bZXb55cSa//7V9esSjRFoz9eolJyIVV?= =?us-ascii?Q?buAypsmIw1z+BJvm1e8+Kc7vOfOilvF0vVcPAOPurIvVnbvNiLOpOjo7IDe9?= =?us-ascii?Q?yFMFKcILZFi45enUNUcxyxGfFpy4CGyWqylK0SkTylKNir7A1K2VYLJOOx6t?= =?us-ascii?Q?PqH6N3shFcMHXTUKWVDAHciGw4djsa0Cg5XWvp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qnG0M9XEl3buZnTlocTEzqLBc0q6DGdm2OxZxAUtdi7AXXSvm14nJo6eMxVDWN4tYthb9y1jP7mNyUBuiTCzynflHSyvzF0AnEFg+3KMteh5DnIIsFnyd5Y+RoFyg5cUBDe0XMU/L7vyydaA4O3RxulQjQMy5iLvz3OZjNU23IeDIPb+hrGJtoDUglIA==; 20:ALrY/W25rYyk1itBlEW3+OO+P6T6E0U1w3T6z/sLQHhvOh4Pyl3PW1yxfFqev5sYHkPb7aBxI08V7WgHKm6rrsCdzBC8rrdWi7T3BPNWRqNMmenxK75PEBF0GRDEY9oY7XT31nIFADlqwhWbrCtOGFLA3rcVjjkvmBYYS5ZJHsU= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2017 21:21:10.2978 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0501MB843 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 Clear out the user response struct correctly. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reported-by: Dan Carpenter Signed-off-by: Adit Ranadive --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c index 5489137..c2aa526 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c @@ -306,7 +306,7 @@ struct ib_ucontext *pvrdma_alloc_ucontext(struct ib_device *ibdev, union pvrdma_cmd_resp rsp; struct pvrdma_cmd_create_uc *cmd = &req.create_uc; struct pvrdma_cmd_create_uc_resp *resp = &rsp.create_uc_resp; - struct pvrdma_alloc_ucontext_resp uresp; + struct pvrdma_alloc_ucontext_resp uresp = {0}; int ret; void *ptr;