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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2CC0C05027 for ; Thu, 2 Feb 2023 16:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CCSE147bBs1wH7hgu/xp1L//TWejZQFl3h3hrVxkhKM=; b=z8tmabu7mXlbdD wOwqrbA8zxOXLZmRkMcpxgrIf87NHFWu44bZwag5+CuMLLZQc1muwJtL5WtGxyiN1UzPUsM6YORh7 +Cp0hGwvSHev+wHRsJHvJbNjf0LOweX9svf9DQnRobVuuEi2JfeUCPSBbv03oGcz4mfaPN55n3iuG 3P2GDBnabI8IpaxbuebohUStXB3ldmpkeWNBInjUFd3LvQHWC4QTU5c/MsTxH+K0qJJ1nLEOwAzZr NX+hfozr/yJaSk3Iqc1qR8U4LF8oL0Y3LO3TjXBVU98R2bV+ou/BgWgRmFR29EI60+IJbzypsjMmp 5nWzwnoD0k8bHvRKp2Yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNcNh-00Gekp-UH; Thu, 02 Feb 2023 16:24:14 +0000 Received: from mleia.com ([178.79.152.223] helo=mail.mleia.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNcNe-00Geji-Gh for linux-arm-kernel@lists.infradead.org; Thu, 02 Feb 2023 16:24:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mleia.com; s=mail; t=1675355045; bh=9NhDOhTQXzsgk1uDWULXFvElxkaDAJYZ7M/FWrpD1RM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AOmMHc+O9mKBwwSYEFk7NH8J0DPhxFDwbciaYunLqeHSV3GqFXEE1kYWXCa2RDZVJ oC6i+h7Hq03MOBzX1BcqiQqsixfjJjoBMzKgwBhMjJOVi+guXIYSA1KEQTgGOfirAO 2NuCP14XS75RxALlUYMPYP6trBmpVHNgdcvk+7IbTrL5+ihyXbU9cvSrZS07Q/aUd2 4huc3lYju0e8nTPflZySERVoEM3Vy53IqFGyV9thaYoZ0REx6VMAmbCWi+uv2efEEm E4xwQOZld8HxxCLyKNihA1bq0bSz7cRMmu/9wU4vOXelGy75fA40UqZ5qR75352r1a 55N2DRlqX0lAQ== Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id 194EA40500A; Thu, 2 Feb 2023 16:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mleia.com; s=mail; t=1675355045; bh=9NhDOhTQXzsgk1uDWULXFvElxkaDAJYZ7M/FWrpD1RM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AOmMHc+O9mKBwwSYEFk7NH8J0DPhxFDwbciaYunLqeHSV3GqFXEE1kYWXCa2RDZVJ oC6i+h7Hq03MOBzX1BcqiQqsixfjJjoBMzKgwBhMjJOVi+guXIYSA1KEQTgGOfirAO 2NuCP14XS75RxALlUYMPYP6trBmpVHNgdcvk+7IbTrL5+ihyXbU9cvSrZS07Q/aUd2 4huc3lYju0e8nTPflZySERVoEM3Vy53IqFGyV9thaYoZ0REx6VMAmbCWi+uv2efEEm E4xwQOZld8HxxCLyKNihA1bq0bSz7cRMmu/9wU4vOXelGy75fA40UqZ5qR75352r1a 55N2DRlqX0lAQ== Message-ID: Date: Thu, 2 Feb 2023 18:24:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH 10/13] USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup() Content-Language: en-US To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: Jakob Koschel , Miaoqian Lin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230202153235.2412790-1-gregkh@linuxfoundation.org> <20230202153235.2412790-10-gregkh@linuxfoundation.org> From: Vladimir Zapolskiy In-Reply-To: <20230202153235.2412790-10-gregkh@linuxfoundation.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20230202_162405_142342_7455CB99 X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_162405_142342_7455CB99 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/2/23 17:32, 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. > > Cc: Vladimir Zapolskiy > Cc: Jakob Koschel > Cc: Miaoqian Lin > Cc: linux-usb@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- Acked-by: Vladimir Zapolskiy -- Best wishes, Vladimir _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 3E4DEC636D4 for ; Thu, 2 Feb 2023 16:41:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232195AbjBBQlN (ORCPT ); Thu, 2 Feb 2023 11:41:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231744AbjBBQlK (ORCPT ); Thu, 2 Feb 2023 11:41:10 -0500 X-Greylist: delayed 600 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 02 Feb 2023 08:40:59 PST Received: from mail.mleia.com (mleia.com [178.79.152.223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E9BB6F706; Thu, 2 Feb 2023 08:40:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mleia.com; s=mail; t=1675355045; bh=9NhDOhTQXzsgk1uDWULXFvElxkaDAJYZ7M/FWrpD1RM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AOmMHc+O9mKBwwSYEFk7NH8J0DPhxFDwbciaYunLqeHSV3GqFXEE1kYWXCa2RDZVJ oC6i+h7Hq03MOBzX1BcqiQqsixfjJjoBMzKgwBhMjJOVi+guXIYSA1KEQTgGOfirAO 2NuCP14XS75RxALlUYMPYP6trBmpVHNgdcvk+7IbTrL5+ihyXbU9cvSrZS07Q/aUd2 4huc3lYju0e8nTPflZySERVoEM3Vy53IqFGyV9thaYoZ0REx6VMAmbCWi+uv2efEEm E4xwQOZld8HxxCLyKNihA1bq0bSz7cRMmu/9wU4vOXelGy75fA40UqZ5qR75352r1a 55N2DRlqX0lAQ== Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id 194EA40500A; Thu, 2 Feb 2023 16:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mleia.com; s=mail; t=1675355045; bh=9NhDOhTQXzsgk1uDWULXFvElxkaDAJYZ7M/FWrpD1RM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AOmMHc+O9mKBwwSYEFk7NH8J0DPhxFDwbciaYunLqeHSV3GqFXEE1kYWXCa2RDZVJ oC6i+h7Hq03MOBzX1BcqiQqsixfjJjoBMzKgwBhMjJOVi+guXIYSA1KEQTgGOfirAO 2NuCP14XS75RxALlUYMPYP6trBmpVHNgdcvk+7IbTrL5+ihyXbU9cvSrZS07Q/aUd2 4huc3lYju0e8nTPflZySERVoEM3Vy53IqFGyV9thaYoZ0REx6VMAmbCWi+uv2efEEm E4xwQOZld8HxxCLyKNihA1bq0bSz7cRMmu/9wU4vOXelGy75fA40UqZ5qR75352r1a 55N2DRlqX0lAQ== Message-ID: Date: Thu, 2 Feb 2023 18:24:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH 10/13] USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup() Content-Language: en-US To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: Jakob Koschel , Miaoqian Lin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230202153235.2412790-1-gregkh@linuxfoundation.org> <20230202153235.2412790-10-gregkh@linuxfoundation.org> From: Vladimir Zapolskiy In-Reply-To: <20230202153235.2412790-10-gregkh@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20230202_162405_142342_7455CB99 X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/23 17:32, 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. > > Cc: Vladimir Zapolskiy > Cc: Jakob Koschel > Cc: Miaoqian Lin > Cc: linux-usb@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- Acked-by: Vladimir Zapolskiy -- Best wishes, Vladimir