Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66309C6379F for ; Wed, 15 Feb 2023 12:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233774AbjBOMnU (ORCPT ); Wed, 15 Feb 2023 07:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233991AbjBOMnN (ORCPT ); Wed, 15 Feb 2023 07:43:13 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A987B3867A for ; Wed, 15 Feb 2023 04:43:12 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4PGyRK09mjz4x84; Wed, 15 Feb 2023 23:43:09 +1100 (AEDT) From: Michael Ellerman To: linuxppc-dev@lists.ozlabs.org, Greg Kroah-Hartman Cc: Michael Ellerman , Nicholas Piggin , Alexey Kardashevskiy , linux-kernel@vger.kernel.org, Christophe Leroy In-Reply-To: <20230202141919.2298821-1-gregkh@linuxfoundation.org> References: <20230202141919.2298821-1-gregkh@linuxfoundation.org> Subject: Re: [PATCH] ppc: iommu: fix memory leak with using debugfs_lookup() Message-Id: <167646482703.1421441.5756331664159282283.b4-ty@ellerman.id.au> Date: Wed, 15 Feb 2023 23:40:27 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Feb 2023 15:19:19 +0100, Greg Kroah-Hartman wrote: > When calling debugfs_lookup() the result must have dput() called on it, > otherwise the memory will leak over time. To make things simpler, just > call debugfs_lookup_and_remove() instead which handles all of the logic > at once. > > Applied to powerpc/next. [1/1] ppc: iommu: fix memory leak with using debugfs_lookup() https://git.kernel.org/powerpc/c/b505063910c134778202dfad9332dfcecb76bab3 cheers