From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "Daniel Örstadius" <daniel.orstadius@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fix double free on AVDTP Abort response
Date: Sun, 21 Feb 2010 19:53:10 +0200 [thread overview]
Message-ID: <2d5a2c101002210953l4ef26078j25f4cc31758b80a7@mail.gmail.com> (raw)
In-Reply-To: <20100221134631.GA25639@jh-x301>
Hi Johan,
On Sun, Feb 21, 2010 at 3:46 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Daniel,
>
> On Sun, Feb 21, 2010, Daniel Örstadius wrote:
>> > Please try to at least do a compile check before you submit patches.
>> > This one gives the following error:
>> > audio/avdtp.c: In function ‘handle_unanswered_req’:
>> > audio/avdtp.c:908: error: comparison between pointer and integer
>> >
>> > What you probably want is session->req->signal_id == AVDTP_ABORT.
>> >
>>
>> Sorry. The attached patch compiles without warnings on "./configure && make".
>> (new dependency to a capabilities lib prevents ./bootstrap-configure atm)
>
> You can avoid that with "./bootstrap-configure --disable-capng"
>
>> The pending request might be freed twice when receiving an Abort
>> response, in handle_unanswered_req and session_cb. Avoid freeing
>> it in handle_unanswered_req.
>> ---
>> audio/avdtp.c | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> Thanks, the patch is now upstream.
While discussing this problem we find out that our timeout doesn't
really work as we imagine due to the possibility of abort being
rejected, so either we don't call any callback on timeout and do it on
abort response while changing to aborting state (which probably means
4-8 sec before we are really able to abort/cancel) or we disconnect as
the other end seems to not cooperate on aborting.
Btw, we probably should have a smaller timeout for avdtp_abort anyway
and make sure we call it upon RequestDisconnect not avdtp_close which
has no priority over the others commands.
Regards,
--
Luiz Augusto von Dentz
Computer Engineer
next prev parent reply other threads:[~2010-02-21 17:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 16:20 [PATCH] Fix double free on AVDTP Abort response Daniel Örstadius
2010-02-19 17:32 ` Johan Hedberg
2010-02-21 12:54 ` Daniel Örstadius
2010-02-21 13:04 ` Marcel Holtmann
2010-02-21 13:46 ` Johan Hedberg
2010-02-21 17:53 ` Luiz Augusto von Dentz [this message]
2010-02-23 14:04 ` Johan Hedberg
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=2d5a2c101002210953l4ef26078j25f4cc31758b80a7@mail.gmail.com \
--to=luiz.dentz@gmail.com \
--cc=daniel.orstadius@gmail.com \
--cc=linux-bluetooth@vger.kernel.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).