Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbdIVRSE (ORCPT ); Fri, 22 Sep 2017 13:18:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbdIVRSC (ORCPT ); Fri, 22 Sep 2017 13:18:02 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A4991821C3 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dledford@redhat.com Message-ID: <1506100680.5172.7.camel@redhat.com> Subject: Re: [PATCH v2] IB/mlx5: fix debugfs cleanup From: Doug Ledford To: Sudip Mukherjee , Matan Barak , Leon Romanovsky , Sean Hefty , Hal Rosenstock Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Date: Fri, 22 Sep 2017 13:18:00 -0400 In-Reply-To: <1505734128-21708-1-git-send-email-sudip.mukherjee@codethink.co.uk> References: <1505734128-21708-1-git-send-email-sudip.mukherjee@codethink.co.uk> Organization: Red Hat, Inc. Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 22 Sep 2017 17:18:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 788 Lines: 19 On Mon, 2017-09-18 at 12:28 +0100, Sudip Mukherjee wrote: > From: Sudip Mukherjee > > If delay_drop_debugfs_init() fails in any of the operations to create > debugfs, it is calling delay_drop_debugfs_cleanup() as part of its > cleanup. But delay_drop_debugfs_cleanup() checks for 'dbg' and since > we have not yet pointed 'dbg' to the debugfs we need to cleanup, the > cleanup fails and we are left with stray debugfs elements and also a > memory leak. > > Fixes: 4a5fd5d2965c ("IB/mlx5: Add necessary delay drop assignment") > Signed-off-by: Sudip Mukherjee Thanks, applied to rc. -- Doug Ledford GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD