Received: by 10.192.165.156 with SMTP id m28csp31462imm; Tue, 10 Apr 2018 15:46:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx487xXMdCQDJH8ckIWK860dF42xS19J7SAN+YapNP+3IFgxR2q2BmvK1OfYChCgAaIYJ/rcM X-Received: by 10.98.33.154 with SMTP id o26mr1901788pfj.54.1523400393970; Tue, 10 Apr 2018 15:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523400393; cv=none; d=google.com; s=arc-20160816; b=L7Mnpe5LQf0lMkPRBDWAmJ0e55WusWJN+D+Iwiy6UWRkXWrHquUw9yMm2hIVuMFvkb dqYj9inck6peFBWduocYXmEQyft6mI90IdpwyDItz3pVoF8dU7dassThPDcQ+rzTTHGJ jm+IUS7LeVNdKyIJh9AGrdA5YY2rQFrQAsEKub//aGb7itxjvHnOl+HMF6LmFKzcLer+ 0v3/ZzqZLVSnmcHjI1dLcsrHQhaNoqrR3EqEd33nF3/8KZjVRnwVJZ8L+C3YBXC7v8t7 uQF8G8a/gOJfMVQtwp7gq7LlCx5jcD4n4h94JdHVn4/szRE9oQ5B1OI9MG7CGWSZbNjA I4GA== 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=qdanhGiwzJgW5xrsd3MevEr1MqjilV1OWz6DMlDnwLY=; b=UZRz1o/RJ/64/fIRQHkdIhQIYgOiK1r+YvJj4SO4h3sN3ZYum3oPojH04B7YNnIfI9 8G9lypZSRgviGaZgVpwaAPDL3JDTbe6JBzGA0FSaPW0UR7y8VKjkBKnAaHONHrXOA8AT INkmIzSdg3jhhaJeO14lzfxuSHKKaZbRsuA9ajo7rb9ltA/U/agMfGO75IufvXZ/mHrg bPKNgAEX9VUaDo6cvZOjAztzxPuQzr118mRqGVRVCgOaVUFBJ1lOkwKXGB7g6IzZhYq4 s68yALnHINMnB+9QkDIREpx1jqTz2hPiYYLkJOT4E8ET6NY3V9u5cizi2yClsOLady9q 7z1A== 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 t21si2855750pfi.221.2018.04.10.15.45.57; Tue, 10 Apr 2018 15:46:33 -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 S932688AbeDJWkH (ORCPT + 99 others); Tue, 10 Apr 2018 18:40:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46366 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756113AbeDJWkF (ORCPT ); Tue, 10 Apr 2018 18:40:05 -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 F0D72E03; Tue, 10 Apr 2018 22:40:03 +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.14 138/138] net/mlx4_core: Fix memory leak while delete slaves resources Date: Wed, 11 Apr 2018 00:25:28 +0200 Message-Id: <20180410212918.281451781@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@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.14-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 @@ -5089,6 +5089,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;