Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1186753imm; Tue, 15 May 2018 15:22:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9UwUS0J7hu6fd0oFfDxEjW7XVO13njuk6aqPxy3oui6aC2FwOF1tq+BoxBpihIdvWHfSY X-Received: by 2002:a62:1a4e:: with SMTP id a75-v6mr16809405pfa.84.1526422923515; Tue, 15 May 2018 15:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526422923; cv=none; d=google.com; s=arc-20160816; b=BSvflzZAmvxU9YVXSW74Big2tL6QORMS4guhx+TwuAqo6ZrZIQbdHm9rqgONcDX8NZ AbhPx/OBDR2yt2jc2bIy7RmSUqt/1wfq1RGalR4w1xWB5L7B8jzemj4/zj4lRhG/dqnT 7d5V1I66HrtIX1vrYVhp9D20rv7PXa5mGMnBbWC/fRnTz+2zdpYu22356/IwaUZk/Zq7 uD3VldPv50ac/seez4BEaMgFBFI37HwkKom6j/srCrrrWUz4v8jUs4Xul+QodoTOBgCo qGAPW+0vDj42xmgBX5h5LUtONssojRM/XrCHYFFOgVYTVSsy1n8nevzQ++UGXcqWc8jK PYQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=adYOIQpdEko6CgFdEOmFP8cYCwcnB+xB3Tdq4EvY6XA=; b=RW9KnghklQAf9W/Epmr6t4V/Bfzh1pzw8Ryd85Y/YdZyRLBmwgTy8+tJSRr6E+CCD2 E97Gc3WSzq6BGrxssdWDdxagxtU0PNYsoXkev8o3RrRTda5Hxdd5x9eXdoSllVTo96hw btRzzXQ4IOwtmB0tuhZukhadkgMeMxolu7DIZGtywR9F9UtYkkP2B/EoSDWlPG1JxLZi ufENbpmnwAx6nfB/h6g8wmZ2z5OUVZc3q+deOYTOAjotFyBrdOFNfgEQKqP+jfhpI43e aJnG03zDGFK0oGdPzUjMA/SyL6hTJEkcoAibLm4l4aG51r5JO/evqNzgNJNOd9OyWgb9 XLYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=ZzcldSBk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u89-v6si1001971pfa.234.2018.05.15.15.21.48; Tue, 15 May 2018 15:22:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=ZzcldSBk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbeEOWVe (ORCPT + 99 others); Tue, 15 May 2018 18:21:34 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38605 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeEOWVc (ORCPT ); Tue, 15 May 2018 18:21:32 -0400 Received: by mail-wr0-f193.google.com with SMTP id 94-v6so1715364wrf.5 for ; Tue, 15 May 2018 15:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=adYOIQpdEko6CgFdEOmFP8cYCwcnB+xB3Tdq4EvY6XA=; b=ZzcldSBk6gpOK4qyJ5s/ZfuiYtAOrRaBSMM60S29YiW6iYK49CGDZXZbLeQpkVseo1 tlmNxEgtnW1GUeqcXBRsAZnA1v+hQG3WBpeJ623vO8gspLCJIDp8BEI0I8VZ12xsnPXj yXHTUCAS1P5wcx6DqJMvINZBaeFojTYAQ1UmmU5bw1rNyHO9vGLDujenxQigaFRciCoU M+aJMxrhJ/4Y0n5GYpl+wEQ8UKdWODacCjFfmmUXWOMd7dpj2FfEIc5SjSGlKWCyEzgs cMwhGH8SPG2W6DNZEldodSIsF6ICw00Pwl4jo77kpB5VacKAsuMCnZEb6l2CoK8+oaVZ 0LIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=adYOIQpdEko6CgFdEOmFP8cYCwcnB+xB3Tdq4EvY6XA=; b=sUJ1xUfFjKo2f0ykB5D0NO6E+a3y0EPtyJQZZGYvxN50Q7Ip0CCY5doYjyxK4pq5hd KHsLzH1CAlkg5TfsHikfwNd7Zz/vh6U5LopT9SHP7u17LKJWqTPpxnzM7qj/lum9U8Ob JiWryq3G+DTcampCAFJXiCP5ScGW1/QgP/wiIeV/Axjip6qIYvgtLfGs9RUXtwT6OjrG z6/xxn4JORlpwR721f5QBdwYIaclO0Jc1KD5kS2BZLg5o+kY5myZnNaJYCIUQ9JKZiaW BTg7vYa9YCd/bo93DhApsxiDmMqI10iHciJBY2XCEVBgnerIvQeyLqmzvvRZNSocVXAZ EoGQ== X-Gm-Message-State: ALKqPweLhwZh/idGS0MyJcmkTkwb24HUT9zV5vgvqdE8tWKoSap/hA+O WFJwV3yDKeUHiWqBD38/scZjjQ== X-Received: by 2002:adf:b065:: with SMTP id g34-v6mr12042871wra.25.1526422891313; Tue, 15 May 2018 15:21:31 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id k3-v6sm1606209wri.28.2018.05.15.15.21.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 15:21:30 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1fIiJx-0005Gg-Py; Tue, 15 May 2018 16:21:25 -0600 Date: Tue, 15 May 2018 16:21:25 -0600 From: Jason Gunthorpe To: Christophe JAILLET Cc: saeedm@mellanox.com, matanb@mellanox.com, leon@kernel.org, dledford@redhat.com, davem@davemloft.net, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH v2] {net, IB}/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' Message-ID: <20180515222125.GA20160@ziepe.ca> References: <20180513070041.24246-1-christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180513070041.24246-1-christophe.jaillet@wanadoo.fr> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Jason