Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2380768ybg; Fri, 5 Jun 2020 12:24:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuK9+VWDmCVtXkF2ALWsgCCEnHZAtmt9rqoLS7ZKUOmX99jmIgazFNra6Y+KZz/UukxA3z X-Received: by 2002:a17:906:f46:: with SMTP id h6mr9988376ejj.144.1591385097700; Fri, 05 Jun 2020 12:24:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591385097; cv=none; d=google.com; s=arc-20160816; b=bKG6mpgrQuYPTMXSjPElolec4Zx7Nj7WCuGLAW+xXWgU6YbUSTsUyG5VUTxMCs/ICc zDGdmOkaPP9EjdC40QbhVgajyNQZ93rmFG4ZuwxtM8/U7+W/TBdFFhAO9vIDOeG+eLl3 RjQU8eumd2XMreQFmjW7M76bIqrFa0aeQ2MC83E2vUP6spP3maOMuwR5beW2nqOngGkU h0fhyKYoaBkFxmVbybJV6eVdLQKQ8BI1Bs2gp/vjxAVLDY6xluMWWi8TnpZ5Z5PNBoXm NUeMHZE7k9xm5aoNO8myxOu1GaPRMFgYdnBXuYmzut8IhcUk+PnhVjS360jvpOSlCfF+ C2tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=u3eZ7mL6mFM01PKlmqjTQsyiKjw3u8JrGHY34L8anUM=; b=TyaBnTI4qK5VZK0gvmFl5s2wk8nXMaYSVKY7XqB/9aYxCxtZYDX7QQG6MF6swMslR2 m81ukzxuoPyqt1nf17ZINTyTtti3s+FHCTrK+ZRGCVNN0NQIjPtjojT7FbND8c/6vil2 WBj14lloYvMZnqcan/de9hdr1Xt5+Jm4MS/NnaIYKnjIPpZ7LjkxMelE3rqCDeOhgJeu R/InHQ18su688htXOkcz9G0+wI5KuAWS3gO/ov/Pa95eb9IEmmjAJc6seTzNWOtNVN6g wOlKXO4XA0wqQUVWwQLYQvQkMlCONudUK2JJoWW0d0sye5js6WxoomtxSooPLeygU7pS Y6rQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si4064564eds.47.2020.06.05.12.24.34; Fri, 05 Jun 2020 12:24:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728063AbgFETWp (ORCPT + 99 others); Fri, 5 Jun 2020 15:22:45 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46773 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbgFETWn (ORCPT ); Fri, 5 Jun 2020 15:22:43 -0400 Received: by mail-lj1-f196.google.com with SMTP id z9so13071845ljh.13; Fri, 05 Jun 2020 12:22:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=u3eZ7mL6mFM01PKlmqjTQsyiKjw3u8JrGHY34L8anUM=; b=uRC/FLX7G6ET1Q97f3P81rPPqcegQUN6cSKoSZPSnXjrx+5twmv0k6aoTvsz0/uBOK EO5yvnJK4llgh7ksipY8K4dlFC6ZJ/ndtJK276UXL7VTd/8/DutjHZjGMhbMw48qmiJw lrCGgrbfvzZ+m7ZmqqsWjq9/XSywzSTx/R6l/fW2y+ThjhLISOPrx1kN+FjVc2A8Cxsk 7hfw8SWCxxx+1v+TYkT9KKu9FpTilPRgh5DoEmD1x0mftvJ7/3r6C7yolv+vM4ANUd1R QmVxBpZS8C/zEqwmbfMh96Jl6ulVywulAu/nVnukc0RILdaz7vOdyiYAUtW/uIZtyK2s 7jkw== X-Gm-Message-State: AOAM533D0hZW31g+txk6ZLisw/5FmRQjMmaJMEBCIqnFtsadMPsHzkBX 5nRSPp81RMd1Ob4N04ik9bk= X-Received: by 2002:a2e:b80b:: with SMTP id u11mr4991886ljo.276.1591384961808; Fri, 05 Jun 2020 12:22:41 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id w6sm1118983ljw.11.2020.06.05.12.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 12:22:41 -0700 (PDT) From: Denis Efremov To: Saeed Mahameed Cc: Denis Efremov , Leon Romanovsky , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/mlx5: Use kfree(ft->g) in arfs_create_groups() Date: Fri, 5 Jun 2020 22:22:35 +0300 Message-Id: <20200605192235.79241-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kfree() instead of kvfree() on ft->g in arfs_create_groups() because the memory is allocated with kcalloc(). Signed-off-by: Denis Efremov --- drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c index 014639ea06e3..c4c9d6cda7e6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c @@ -220,7 +220,7 @@ static int arfs_create_groups(struct mlx5e_flow_table *ft, sizeof(*ft->g), GFP_KERNEL); in = kvzalloc(inlen, GFP_KERNEL); if (!in || !ft->g) { - kvfree(ft->g); + kfree(ft->g); kvfree(in); return -ENOMEM; } -- 2.26.2