Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9840217pxu; Tue, 29 Dec 2020 06:36:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWxzPM/g18nFFgAdCcHCWP2FGcVeyMWF+AnkhR/vJZeNsh+2PPmyAvVnkk9Wl9gsMEsxmh X-Received: by 2002:aa7:c886:: with SMTP id p6mr46670157eds.207.1609252604674; Tue, 29 Dec 2020 06:36:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609252604; cv=none; d=google.com; s=arc-20160816; b=QamHo8CZQlqUhtJhb5NY2GKvD/g+9RgAe/Zg3j68jw0K8y/v7qgEGiCGw19Q5w5njR SSv3HfUAWvIsBHNU/Yz6A2tDjhntnn2aZOXZBOlak0Wm+Os2J9P/IoWqBjgHsIWYPIMJ +SjhAAdE4LBwVLh+IxnLA+3MaHeDEARXs8KAf1Qe/wWkA7Qbbr2T9y4nJbJV0uFc5J+G 3E4ytNOs+P2CHqkwaYPG+SJUMv4FgC5c7F/pIs6/Gv5QqWK56187B7QaYycsU8RMMDuW joOZwSIdebLttuut1dFfH3lwjevXHIutVx6l20/V8Dsb8Wps10AmW6ntqJZhWmlVU1fr 1HcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=XkyaSN6Gav3/x1KowQJXbqXx2kIHyUgMfg3570oMe48=; b=Hk+QvYffS+9OhXKS4WS2Z7xqPUF+e6yIGzZhU3N/q9S7Eh9U6cKhDWyC3DMTlo2ida m3raEgc0eW+psyZefd8Ndz7sPp1s1cuxmF15oLqQmpeibgwrVPM+c9F6fBcyFA0aIo+7 QQUsNVvjjEqJtXBPcbfvrKcoLdHEHNlaM9k3CXDLSM4VKceGKFGRfpLQlQLTvpSd9zHW BvreJcO27NrpcC6EGzamkK1hx/Du8HfedaDKiqWqS3D28dyX0wrT+noWWwtxidc0DkjF e4gNGL9vwq8n3EJNHDsroYZXV/QvCY/9EoESjTpUGTgewiwsNWXLb7TgRypFGFMSDqi9 kBxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X+9rYKhV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p24si21893223edw.475.2020.12.29.06.36.22; Tue, 29 Dec 2020 06:36:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X+9rYKhV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbgL2OdX (ORCPT + 99 others); Tue, 29 Dec 2020 09:33:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:57412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726388AbgL2OdX (ORCPT ); Tue, 29 Dec 2020 09:33:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EEA4E20867; Tue, 29 Dec 2020 14:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609252362; bh=o8G01+EUJ4PFnjk2eLKaq/MrDAUuZ0xOUrjXHZwYqGE=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=X+9rYKhVsGuc9wHvNx5+mzgOh23QKwo4c2931HBq5/z/KxQFEPYwX8cTppMWdM0RW g7jY32S770rWMEMr8Lc8emWtZWNjOHVZp8wgL0AsyYkCB6NdiCIc8yaFHw4xkbD71U oi7dvM67rbvnvA5hj6ss53mQSEeuXqx8nyBFoX0jnXTdRFzgChyrRjgQIE5LLGNVz0 zRfu7W48+woEV28aZ47cMOrzoBwSjROh33wT58rjFY1hYO5Mri1x+Z3GTNrtjVAqy5 ezA99u6aIa5Y/7EGtgn9o38GmVauOTPG+b/bYjTA2ppwPscdyWkPeMFHnqWysM1pYl mVB+fBKXkT0Rw== From: Mark Brown To: Xiaolei Wang Cc: linux-kernel@vger.kernel.org, david@lechnology.com, gregkh@linuxfoundation.org, rafael@kernel.org In-Reply-To: <20201229105046.41984-1-xiaolei.wang@windriver.com> References: <20201229105046.41984-1-xiaolei.wang@windriver.com> Subject: Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev Message-Id: <160925234119.47920.2670168056681998812.b4-ty@kernel.org> Date: Tue, 29 Dec 2020 14:32:21 +0000 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 Tue, 29 Dec 2020 18:50:46 +0800, Xiaolei Wang wrote: > After initializing the regmap through > syscon_regmap_lookup_by_compatible, then regmap_attach_dev to the > device, because the debugfs_name has been allocated, there is no > need to redistribute it again > > unreferenced object 0xd8399b80 (size 64): > comm "swapper/0", pid 1, jiffies 4294937641 (age 278.590s) > hex dump (first 32 bytes): > 64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72 > dummy-iomuxc-gpr > 40 32 30 65 34 30 30 30 00 7f 52 5b d8 7e 42 69 > @20e4000..R[.~Bi > backtrace: > [] kasprintf+0x2c/0x54 > [<6ad3bbc2>] regmap_debugfs_init+0xdc/0x2fc > [] __regmap_init+0xc38/0xd88 > [<1f7e0609>] of_syscon_register+0x168/0x294 > [<735e8766>] device_node_get_regmap+0x6c/0x98 > [] imx6ul_init_machine+0x20/0x88 > [<0456565b>] customize_machine+0x1c/0x30 > [] do_one_initcall+0x80/0x3ac > [<7e584867>] kernel_init_freeable+0x170/0x1f0 > [<80074741>] kernel_init+0x8/0x120 > [<285d6f28>] ret_from_fork+0x14/0x20 > [<00000000>] 0x0 Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next Thanks! [1/1] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev commit: cffa4b2122f5f3e53cf3d529bbc74651f95856d5 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark