Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2229691ybh; Fri, 24 Jul 2020 07:39:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQCw8ugn6BZp/NPK5nU2JK3XQDVK4sTi3PjoaG0bBeJukronVK9MuDN0ogVP7X9qYyK5Hf X-Received: by 2002:a17:906:c1d8:: with SMTP id bw24mr9221097ejb.91.1595601548014; Fri, 24 Jul 2020 07:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595601548; cv=none; d=google.com; s=arc-20160816; b=mmXHoKRMhvjfiPx/rI/CbUF7Yar+hdxuVwyxNLl1zcMhfDRfam+QLQML0+Pm1eRDY/ MMxRYJb5Chg7kexIqrkTvUobFjgVXl0RR/6EoiQrf63YSqV95d4l+Rv+fNRMbT6N9l+T Q+YuGKixE3IRhBVHYCkLQFWdEjP+q64kAtRmO8iXivJEVhbj97o6/x5TrN/2owG4Dkul 7+MojzDPq9TFAOVEixl7AiEbTSyz5nwOPNeeN9o5PoGoHXZiB0GykiguKl6ymNGIrPBs wMpc6W4O8dSXTppEnYeQDaccu2nx3jB7+e/qPr6ra1j2UBnSQFkwmbfcwGJk0jTjqOwX letA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:subject:references:in-reply-to :cc:to:from:date:dkim-signature; bh=2AfL394ILmjWLzaMM3VSX4Oej3ZgUa5HMhLZID9ht0M=; b=hHEyp+DQsbhhw+pnbm/dp2k4rKWTn5tiLJSuHyhn8NVQLW4tNwLRliU8CYX0RqAEsA U4tV2iVv9W53J2d7x95B3rjYQMynMTaTk3TB1FCaU2M+mIEz7H7I/Y2BGQJLjdPM2Cjw 5ajOpeWIe7G1uXUBqRkR9Y+T83ERHLXzSB20Rn29rfgjWbJ4Nqxx0RFYcOxv5DQEzGLj M4xJ30Gp61r43YB+q0OsFSLV9dxd7YY6eGzN5iumbwjez0Jye3+miklt9Delm7qJQ3gd MlsFfWL1wLF6AAmmcEpVlNQ9Xe5wmGC4VdK/Sh29y1HKIF6kDt6o/gdspSKObRNPRE3Q rYbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ccmTg/hZ"; 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 q17si685203eja.355.2020.07.24.07.38.44; Fri, 24 Jul 2020 07:39:08 -0700 (PDT) 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=default header.b="ccmTg/hZ"; 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 S1726877AbgGXOhi (ORCPT + 99 others); Fri, 24 Jul 2020 10:37:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:54414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbgGXOhi (ORCPT ); Fri, 24 Jul 2020 10:37:38 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15C7F2065C; Fri, 24 Jul 2020 14:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595601457; bh=vvXRFf9DR9prMCJTMjWUgfZ40QqlI5frl3EKxELfXEw=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=ccmTg/hZvx3U8RIzCUDQcVoSBByBY/eBTr19sIwu3Ve24JomDxPRzOMMNyRAxtdXv 7yDzKKt87pZIQMa2tq1gxB2Utmp0l/pPxgm3m6WQMebl+DkhWBKUHPcedTFYNb2DY4 b2+U1imNTH4E1J2Bfg5MLMoRUkqdkIBf5UNjnDY0= Date: Fri, 24 Jul 2020 15:37:22 +0100 From: Mark Brown To: Vladimir Zapolskiy , Liam Girdwood Cc: linux-kernel@vger.kernel.org, Wen Yang In-Reply-To: <20200724005013.23278-1-vz@mleia.com> References: <20200724005013.23278-1-vz@mleia.com> Subject: Re: [PATCH] regulator: fix memory leak on error path of regulator_register() Message-Id: <159560144247.13250.1416101687025192776.b4-ty@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Jul 2020 03:50:13 +0300, Vladimir Zapolskiy wrote: > The change corrects registration and deregistration on error path > of a regulator, the problem was manifested by a reported memory > leak on deferred probe: > > as3722-regulator as3722-regulator: regulator 13 register failed -517 > > # cat /sys/kernel/debug/kmemleak > unreferenced object 0xecc43740 (size 64): > comm "swapper/0", pid 1, jiffies 4294937640 (age 712.880s) > hex dump (first 32 bytes): > 72 65 67 75 6c 61 74 6f 72 2e 32 34 00 5a 5a 5a regulator.24.ZZZ > 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ > backtrace: > [<0c4c3d1c>] __kmalloc_track_caller+0x15c/0x2c0 > [<40c0ad48>] kvasprintf+0x64/0xd4 > [<109abd29>] kvasprintf_const+0x70/0x84 > [] kobject_set_name_vargs+0x34/0xa8 > [<62282ea2>] dev_set_name+0x40/0x64 > [] regulator_register+0x3a4/0x1344 > [<16a9543f>] devm_regulator_register+0x4c/0x84 > [<51a4c6a1>] as3722_regulator_probe+0x294/0x754 > ... > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [1/1] regulator: fix memory leak on error path of regulator_register() commit: 9177514ce34902b3adb2abd490b6ad05d1cfcb43 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