From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752169AbeEPANA (ORCPT ); Tue, 15 May 2018 20:13:00 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33743 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbeEPAM6 (ORCPT ); Tue, 15 May 2018 20:12:58 -0400 X-Google-Smtp-Source: AB8JxZqbRd8EdR72LyUnhiJtJc0dc3SJwLnYAaGJSHI+oM++J359/wwJ5FIlCXAYBhJSp8ObEGRgAHMiTwCl1gDADw8= MIME-Version: 1.0 In-Reply-To: <20180515222125.GA20160@ziepe.ca> References: <20180513070041.24246-1-christophe.jaillet@wanadoo.fr> <20180515222125.GA20160@ziepe.ca> From: Saeed Mahameed Date: Tue, 15 May 2018 17:12:36 -0700 Message-ID: Subject: Re: [PATCH v2] {net, IB}/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' To: Jason Gunthorpe Cc: Christophe JAILLET , Saeed Mahameed , Matan Barak , Leon Romanovsky , Doug Ledford , "David S. Miller" , Linux Netdev List , RDMA mailing list , linux-kernel , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 3:21 PM, Jason Gunthorpe wrote: > On Sun, May 13, 2018 at 09:00:41AM +0200, Christophe JAILLET wrote: >> When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to >> free it. >> >> Signed-off-by: Christophe JAILLET >> --- >> v1 -> v2: More places to update have been added to the patch >> --- >> drivers/infiniband/hw/mlx5/cq.c | 2 +- >> drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- >> drivers/net/ethernet/mellanox/mlx5/core/vport.c | 6 +++--- >> 3 files changed, 5 insertions(+), 5 deletions(-) > > I agree with Eric on the need for fixes lines in v3.. > >> 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); > > For the infiniband part: > > Acked-by: Jason Gunthorpe > > Since this is mostly ethernet, can it go through netdev? thanks > for the mlx5 core parts: Acked-by: Saeed Mahameed Yes i will take v3 to mlx5-next branch. > Jason > -- > 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