From mboxrd@z Thu Jan 1 00:00:00 1970 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 731E2C61DA4 for ; Thu, 9 Feb 2023 12:28:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229766AbjBIM2M (ORCPT ); Thu, 9 Feb 2023 07:28:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjBIM2C (ORCPT ); Thu, 9 Feb 2023 07:28:02 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 957A086AD; Thu, 9 Feb 2023 04:28:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 27B0CB8211A; Thu, 9 Feb 2023 12:28:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5875FC433EF; Thu, 9 Feb 2023 12:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1675945678; bh=ATL0djbkEUSi/KWp+SICltBse0RRA4vkL5CV9dcF9BI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2Rc5VnU/AxCLBb7+MbeindkrlcMD05/DD0RJUxiTnR7Hktvk6bHxcMeEsMPExrxlX 3FzyqHwCX9l70lHGXRvaf/llA9pSx/j9/cZVaH0ozUIZT57o6y1iWSBwR13GOi9Wn2 L6lyNom1+5uFtLkALnQGGKbgfn+MCmLQFl4mDLKM= Date: Thu, 9 Feb 2023 13:27:55 +0100 From: Greg Kroah-Hartman To: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, Karan Tilak Kumar , Sesidhar Baddela , "James E.J. Bottomley" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: snic: fix memory leak with using debugfs_lookup() Message-ID: References: <20230202141009.2290380-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 08, 2023 at 06:50:53PM -0500, Martin K. Petersen wrote: > > Greg, > > > 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 6.3/scsi-staging, thanks! Wonderful, thank you!