linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@nokia.com>
To: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v2] Fix regression causing crash in 3-way calling
Date: Wed, 8 Dec 2010 14:54:58 +0200	[thread overview]
Message-ID: <20101208125455.GA23047@jh-x301> (raw)
In-Reply-To: <1291809471-806-2-git-send-email-dmitriy.paliy@nokia.com>

Hi Dmitriy,

On Wed, Dec 08, 2010, Dmitriy Paliy wrote:
> Fix obexd crash in 3-way calling scenario. Crash happens when there
> is redialed second incoming call. Cache for the PBAP session is
> already created at that moment, but PBAP object is destroyed. Crash
> happens when object is dereferenced in vobject_list_open.
> 
> Therefore, PBAP object has to be created before any attempt to write
> cached data to buffer associated to this object.
> 
> However, cache_ready_notify function, which is invoked in
> vobject_vcard_open for valid cache case, sends also PBAP object data
> via callback function to obex.c and written to OBEX stream as GET
> response in handle_async_io handler function.
> 
> A new response is sent to OBEX stream after cache_ready_notify exists
> to vobject_list_open function, which is callback function for
> obex_mime_type_driver. Such leads to undefined befavior. Therefore,
> cache_ready_notify is splitted in two cache_ready_notify and
> generate_response functions.
> 
> generate_response fills data to buffer and returns error, if any,
> while cache_ready_notify notifies OBEX core to write this data to
> stream.
> 
> In order to avoid writing to stream twice, cache_ready_notify is
> replaced by generate_response in vobject_list_open. As a result,
> PBAP buffer data is generated from existing cache and sent to
> stream upon start of OBEX stream after vobject_list_open exits.
> ---
>  plugins/pbap.c |   98 +++++++++++++++++++++++++++++++-------------------------
>  1 files changed, 54 insertions(+), 44 deletions(-)

Pushed upstream. Thanks.

Johan

  reply	other threads:[~2010-12-08 12:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 11:57 [PATCH 0/1 v2] Fix regression causing crash in 3-way calling Dmitriy Paliy
2010-12-08 11:57 ` [PATCH " Dmitriy Paliy
2010-12-08 12:54   ` Johan Hedberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-08 11:48 [PATCH 0/1 " Dmitriy Paliy
2010-12-08 11:48 ` [PATCH " Dmitriy Paliy

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=20101208125455.GA23047@jh-x301 \
    --to=johan.hedberg@nokia.com \
    --cc=dmitriy.paliy@nokia.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).