Received: by 10.192.165.156 with SMTP id m28csp53763imm; Tue, 10 Apr 2018 16:14:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/f5qKwuzqiJHyWc+IlqehycWLqaO9VMCC3S9//AVUaliek9PzhjvpfuG49Rnz4t+Kk0QKv X-Received: by 10.101.75.12 with SMTP id r12mr1657380pgq.36.1523402077688; Tue, 10 Apr 2018 16:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523402077; cv=none; d=google.com; s=arc-20160816; b=m3NFhJMwTbnssuO0sIQRwQEHV1PiJuGJMr3X6paYNSaOJqTwYWEoAqjfofWaCJSMo8 TboAagUDuYsIPTHJfxwoWPYrYDbEC538YIh2uU713l30yw2B7kYnipBaduqQNfG2sm+8 80Q8UOBfUBF/pQJdZ6nGjLtGDkwezdGB0pXBtLUpCT+yKlA4a+HwYLzhTDj//z8WlMka BnJNlvhzVQWMvfPA5ALx2UVr5aXAimywwS2Epd1/1VDvpiy2JQyso+xmyO+YRyjhIJJv vpyU+sH5tZx76aXciwq/jiAX0M3wPTBV0RCNcr/tZlBGkV06Z1os+by4GxNp62zLcBeN CsCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=z3Nho64pMYb38F1yax2YHuIaAH7YnobbSxcxU+nd/SM=; b=u8nV36HU9uewzYpAxFfgxYEpT8e1zgMXCeisDUqz4Mkdnz9x4zhvdE9X204Ava2zna S+CJfUbIokWdDk5q92bOrKfNe+3Y2eD85dYczQf6BYKxeu1uMGfrBFJNZ6gFJPlcXS4D a7Ed1Fck66Di76fV7g0FIv72+bfX4/YiOAQCB9XhPXyW58Nl/3HenmC1kxILxtxY2SCk lFFKkLUcR9ZyM/0kZSED3/3lOfMWV3SoN7lCTMJI7sWMZV7byDng3WlqGoDxM0BRPaSM HZNKUrq8Ez2AQEDPRR6+MlWwI9JKlI6F2XEkkSf1FbVkubHA5dcPBRYHHz7QQljJbgbC qVyw== ARC-Authentication-Results: i=1; mx.google.com; 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 k73si2458111pge.131.2018.04.10.16.14.01; Tue, 10 Apr 2018 16:14:37 -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; 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 S1755206AbeDJWdY (ORCPT + 99 others); Tue, 10 Apr 2018 18:33:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41288 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932098AbeDJWdW (ORCPT ); Tue, 10 Apr 2018 18:33:22 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 545E6907; Tue, 10 Apr 2018 22:33:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Moshe Shemesh , Tariq Toukan , "David S. Miller" Subject: [PATCH 4.15 168/168] net/mlx4_core: Fix memory leak while delete slaves resources Date: Wed, 11 Apr 2018 00:25:10 +0200 Message-Id: <20180410212808.371930070@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Moshe Shemesh [ Upstream commit 461d5f1b59490ce0096dfda45e10038c122a7892 ] mlx4_delete_all_resources_for_slave in resource tracker should free all memory allocated for a slave. While releasing memory of fs_rule, it misses releasing memory of fs_rule->mirr_mbox. Fixes: 78efed275117 ('net/mlx4_core: Support mirroring VF DMFS rules on both ports') Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -5088,6 +5088,7 @@ static void rem_slave_fs_rule(struct mlx &tracker->res_tree[RES_FS_RULE]); list_del(&fs_rule->com.list); spin_unlock_irq(mlx4_tlock(dev)); + kfree(fs_rule->mirr_mbox); kfree(fs_rule); state = 0; break;