From patchwork Fri May 18 01:22:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 10408039 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 F418B60247 for ; Fri, 18 May 2018 01:24:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5CB928755 for ; Fri, 18 May 2018 01:24:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA05328806; Fri, 18 May 2018 01:24:49 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY 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 5FAB328755 for ; Fri, 18 May 2018 01:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244AbeERBX2 (ORCPT ); Thu, 17 May 2018 21:23:28 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:42701 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752343AbeERBX0 (ORCPT ); Thu, 17 May 2018 21:23:26 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from saeedm@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 May 2018 04:25:13 +0300 Received: from stpd.hsd1.ca.comcast.net ([172.16.5.22]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w4I1N5aD007096; Fri, 18 May 2018 04:23:18 +0300 From: Saeed Mahameed To: "David S. Miller" , Doug Ledford Cc: Jason Gunthorpe , Leon Romanovsky , Or Gerlitz , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Christophe JAILLET , Saeed Mahameed Subject: [for-next 03/15] IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' Date: Thu, 17 May 2018 18:22:46 -0700 Message-Id: <20180518012258.26968-4-saeedm@mellanox.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518012258.26968-1-saeedm@mellanox.com> References: <20180518012258.26968-1-saeedm@mellanox.com> 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 From: Christophe JAILLET When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to free it. Fixes: 1cbe6fc86ccfe ("IB/mlx5: Add support for CQE compressing") Signed-off-by: Christophe JAILLET Acked-by: Jason Gunthorpe Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index 77d257ec899b..6d52ea03574e 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c @@ -849,7 +849,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata, return 0; err_cqb: - kfree(*cqb); + kvfree(*cqb); err_db: mlx5_ib_db_unmap_user(to_mucontext(context), &cq->db);