Received: by 10.192.165.148 with SMTP id m20csp4371275imm; Tue, 24 Apr 2018 01:22:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx490G7/UOVIbncNoWdAXxiQXVfrC8iuSva3I1XnzHLnjN49Jlekw1wDW9CvcSZFrG5Iek82W X-Received: by 10.99.124.4 with SMTP id x4mr18782746pgc.67.1524558128674; Tue, 24 Apr 2018 01:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524558128; cv=none; d=google.com; s=arc-20160816; b=b/ExRIm7vFSjZdihe5d1aC0FcWEeikG7+LiyxCT5o9FcC89P+Sd9dlgxPc5sEAPLvQ U3ReNjap5qx7kuFnMTh1LdgXkFcLtGzGKf+vVfoCFO6fkx2mmWlp4cibGPuYVljW0hGK Jh6BpJ1XeP72i3k4g10QBEjdAlZmWKIGJZNpyOL1trWtwNYn7mMLPhl4dmNj2hK4Uf41 HiXwzzg1R5M48BngVHqpauovZt9xl8UefGNGCPP9tmvaARXTq7Vs6qE6L3RTdgoyArPG zsA4ybpAWyTKPy7eLmM1q4DXtqR44CDlOAJiLLTsbIBUvYX/ubg+qTG56hi8hDgRI9Kg Jj3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=57t3KDXf4WlKzDOMySwiBQAhC7ghhJXFH02ck8N8FBc=; b=cKvPrWEPk39RaxZFws1i7Mk4zjUqmkMpYJ5QWLwSVrb22ndqWy8iMPRzUDfY0e3nRs +Uk9CqS/YnGsCng4xZE8v94mXkLpAbYDhr222QU/mROaOBHUBq0qDAKkeemKIJwuzlZv bJVas3ybbOPS6jrjLumwlB+v4fB2yDxhSXuw7VE7QgwA0+EIazPh1vP2YfKjo96x9G+B dLBskGu/MHu74jf7AIi8kZxQZiNBGaxUaJBA34OkBBmMQpi3dC0jD7KH3+VODMgAVrUe OtyIHnLEbB0tLMXt64oSn5ebpSKxDW7WPKG3PM0U6AgWWESm3CqELIbCSIsKB4wSOgCU fJag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39-v6si13683013plg.570.2018.04.24.01.21.53; Tue, 24 Apr 2018 01:22:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756104AbeDXHQZ (ORCPT + 99 others); Tue, 24 Apr 2018 03:16:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38770 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbeDXHQY (ORCPT ); Tue, 24 Apr 2018 03:16:24 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C76CE42B; Tue, 24 Apr 2018 07:16:23 +0000 (UTC) Date: Tue, 24 Apr 2018 09:16:18 +0200 From: Greg Kroah-Hartman To: Kirill Marinushkin Cc: Stefan Wahren , devel@driverdev.osuosl.org, Florian Fainelli , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, Eric Anholt , Andy Shevchenko , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] staging: bcm2835-audio: Disconnect and free vchi_instance on module_exit() Message-ID: <20180424071618.GB17825@kroah.com> References: <20180417050028.19372-1-k.marinushkin@gmail.com> <20180423135024.GA2337@kroah.com> <7e2dbb73-f93d-7b87-2fa0-d8b40f4a11a5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e2dbb73-f93d-7b87-2fa0-d8b40f4a11a5@gmail.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 02:35:50AM +0200, Kirill Marinushkin wrote: > On 04/23/18 15:50, Greg Kroah-Hartman wrote: > > On Tue, Apr 17, 2018 at 07:00:28AM +0200, Kirill Marinushkin wrote: > >> In the current implementation, vchi_instance is inited during the first > >> call of bcm2835_audio_open_connection(), and is never freed. It causes a > >> memory leak when the module `snd_bcm2835` is removed. > >> > >> Here is how this commit fixes it: > >> > >> * the VCHI context (including vchi_instance) is created once in the > >> platform's devres > >> * the VCHI context is allocated and connected once during module_init() > >> * all created bcm2835_chips have a pointer to this VCHI context > >> * bcm2835_audio_open_connection() can access the VCHI context through the > >> associated bcm2835_chip > >> * the VCHI context is disconnected and freed once during module_exit() > >> > >> After this commit is applied, I don't see other issues with the module's > >> init/exit, so I also remove the associated TODO task. > >> > >> Steps to reproduce the memory leak before this commit: > > > > > > Patch dropped due to kbuild complaints. > > > > Please fix up and resend. > > > > thanks, > > > > greg k-h > > Hello Greg, > > Due to which complains of kbuild is the patch dropped? > I would like to fix the complains, but I don't see any errors or warnings on my > side. > Are you sure that the kbuild test robot did it's job correctly? The log says: > > >> it may well be a FALSE warning > > Please show me what is wrong in my patch. I have no idea as the patch is long gone from my queue now. If you think all is fine, please resend it and I will be glad to review it again. thanks, greg k-h