LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Kirill Marinushkin <k.marinushkin@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Eric Anholt <eric@anholt.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	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()
Date: Tue, 24 Apr 2018 10:14:16 +0200	[thread overview]
Message-ID: <20eae5c0-8e35-2295-f4c4-1d8f65ed63ea@i2se.com> (raw)
In-Reply-To: <7e2dbb73-f93d-7b87-2fa0-d8b40f4a11a5@gmail.com>

Hi Kirill,

Am 24.04.2018 um 02:35 schrieb Kirill Marinushkin:
> 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:
>> <snip>
>>
>> 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.
>
> The log from kbuild test robot says:
>
>>> [auto build test WARNING on staging/staging-testing]
>>> [also build test WARNING on v4.17-rc1]
>>> [cannot apply to anholt/for-next]
>>> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>>> url:
> https://github.com/0day-ci/linux/commits/Kirill-Marinushkin/staging-bcm2835-audio-Disconnect-and-free-vchi_instance-on-module_exit/20180417-193147
>>> config: arm-allmodconfig
>>> compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
>>> reproduce:
>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
> -O ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> make.cross ARCH=arm allmodconfig
>>> make.cross ARCH=arm
>>>
>>> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
>>> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
> I cannot clone from the given url, because it does not exist.
> I cannot use the compiler from the log, because it is built for x86_64, and my
> host machine is i686.
> Below are the steps how I tried to reproduce the issue, but errors or warnings
> didn't happen.
>
> I applied the patch on top of the following upstream tag:
> 60cc43fc8884 (tag: v4.17-rc1) Linux 4.17-rc1
>
> And executed:
> make CROSS_COMPILE=arm-linux-gnueabihf- --jobs=4 ARCH=arm allmodconfig
> make CROSS_COMPILE=arm-linux-gnueabihf- --jobs=4 ARCH=arm
>
> But the compilation succeed without any errors or warnings.
>
> My compiler version is:
> arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC
> 2013.11) 4.8.3 20140106 (prerelease)

this is an old toolchain. You can download newer ones here (even for i686):

https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/

Best regards
Stefan

>
> Best Regards,
> Kirill
>

      parent reply	other threads:[~2018-04-24  8:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17  5:00 Kirill Marinushkin
2018-04-17 19:56 ` kbuild test robot
2018-04-23 13:50 ` Greg Kroah-Hartman
2018-04-24  0:35   ` Kirill Marinushkin
2018-04-24  7:16     ` Greg Kroah-Hartman
2018-04-24  7:44       ` [RESEND PATCH] " Kirill Marinushkin
2018-04-24 11:50         ` Dan Carpenter
2018-04-24 16:24         ` Andy Shevchenko
2018-04-24 18:27         ` Kirill Marinushkin
2018-04-24 18:35           ` Andy Shevchenko
2018-04-24 18:51             ` Kirill Marinushkin
2018-04-25  6:16               ` Greg Kroah-Hartman
2018-04-24 19:57           ` [PATCH v2] " Kirill Marinushkin
2018-04-25  6:16             ` Greg Kroah-Hartman
2018-04-25 17:35               ` Kirill Marinushkin
2018-04-26  5:38                 ` Dan Carpenter
2018-04-26 17:34               ` [PATCH v3] " Kirill Marinushkin
2018-04-24  8:14     ` Stefan Wahren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20eae5c0-8e35-2295-f4c4-1d8f65ed63ea@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.marinushkin@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --subject='Re: [PATCH] staging: bcm2835-audio: Disconnect and free vchi_instance on module_exit()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).