From: Jarkko Nikula <jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
Cc: linux-bluetooth
<linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Gustavo F. Padovan"
<gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org>,
Johan Hedberg
<johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Frederic Danis
<frederic.danis-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: Re: [PATCH 1/5] Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list()
Date: Thu, 01 Oct 2015 11:39:06 +0300 [thread overview]
Message-ID: <560CF12A.8020709@linux.intel.com> (raw)
In-Reply-To: <B5ED0060-B534-493D-B6CD-16E44D255B2C-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
On 10/01/2015 11:05 AM, Marcel Holtmann wrote:
> Hi Jarkko,
>
>>> Caller of acpi_dev_get_resources() should free the constructed resource
>>> list by calling the acpi_dev_free_resource_list() in order to avoid memory
>>> leak.
>>>
>>> Signed-off-by: Jarkko Nikula <jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>>> ---
>>> Call to acpi_dev_get_resources() was introduced by the commit ae056908862b
>>> ("Bluetooth: hci_bcm: Retrieve UART speed from ACPI") so fix should go to
>>> v4.3-rc.
>>
>> if this should go into 4.3 then you need to send it against bluetooth tree actually and not bluetooth-next. And you might want to include patch 2/5 in there as well. Sending them as combined set with bluetooth-next patches is not really helping.
>>
>> In case this is not an urgent fix that has to make it into 4.3, then I am just applying all 5 to bluetooth-next tree. Your choice.
>
> I changed my mind here and applied all 5 patches to bluetooth-next tree.
>
Ah, sorry, brain fart from me to send these together.
Anyway, issue doesn't look fatal as leak happens only during probe time
and may not actually even exists. At least on Asus T100TA the
acpi_dev_get_resources() for the "BCM2E39" device returns 0, i.e. it
doesn't build the list but calls the bcm_resource() a few times still.
Looks like acpi_dev_get_resources() builds the list for certain types of
resources and probably not for these GPIO and serial bus that
bcm_resource() is handling.
--
Jarkko
prev parent reply other threads:[~2015-10-01 8:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 13:26 [PATCH 1/5] Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list() Jarkko Nikula
[not found] ` <1443619605-19320-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-30 13:26 ` [PATCH 2/5] Bluetooth: hci_bcm: Handle possible error from acpi_dev_get_resources() Jarkko Nikula
2015-09-30 13:26 ` [PATCH 3/5] Bluetooth: hci_bcm: Remove needless acpi_match_device() call Jarkko Nikula
2015-09-30 13:26 ` [PATCH 4/5] Bluetooth: hci_bcm: Remove needless looking code Jarkko Nikula
2015-09-30 13:26 ` [PATCH 5/5] Bluetooth: hci_bcm: Do not test ACPI companion in bcm_acpi_probe() Jarkko Nikula
2015-10-01 7:13 ` [PATCH 1/5] Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list() Marcel Holtmann
2015-10-01 8:05 ` Marcel Holtmann
[not found] ` <B5ED0060-B534-493D-B6CD-16E44D255B2C-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2015-10-01 8:39 ` Jarkko Nikula [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=560CF12A.8020709@linux.intel.com \
--to=jarkko.nikula-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=frederic.danis-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org \
--cc=johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).