From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] core: Do not call the callback on btd_cancel_authorization
Date: Fri, 26 Oct 2012 14:58:28 +0300 [thread overview]
Message-ID: <20121026115828.GA8570@x220> (raw)
In-Reply-To: <1351252089-19329-1-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Fri, Oct 26, 2012, Luiz Augusto von Dentz wrote:
> btd_cancel_authorization should work like g_source_remove and not attempt
> to reach the callback as its maybe already invalid or lead to double free
> situations such as this:
>
> Invalid write of size 4
> at 0x13D480: connection_lost (avdtp.c:1102)
> by 0x13F37A: session_cb (avdtp.c:2281)
> by 0x4C7B824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x4C7BB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x4C7BF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x122B21: main (main.c:551)
> Address 0x6512ac0 is 32 bytes inside a block of size 1,184 free'd
> at 0x4A07786: free (vg_replace_malloc.c:446)
> by 0x4C8150E: g_free (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x13D4A9: connection_lost (avdtp.c:1216)
> by 0x13D55E: auth_cb (avdtp.c:2471)
> by 0x17E99A: service_auth_cancel (adapter.c:1021)
> by 0x183C67: btd_cancel_authorization (adapter.c:3358)
> by 0x13D477: connection_lost (avdtp.c:1098)
> by 0x13F37A: session_cb (avdtp.c:2281)
> by 0x4C7B824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x4C7BB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x4C7BF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
> by 0x122B21: main (main.c:551)
> ---
> src/adapter.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Applied. Thanks.
Johan
prev parent reply other threads:[~2012-10-26 11:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 11:48 [PATCH BlueZ] core: Do not call the callback on btd_cancel_authorization Luiz Augusto von Dentz
2012-10-26 11:58 ` Johan Hedberg [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=20121026115828.GA8570@x220 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/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).