From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2] hfp_hf: Fix modifying hash table while iterating
Date: Thu, 19 Apr 2012 07:41:56 -0500 [thread overview]
Message-ID: <4F900814.4030507@gmail.com> (raw)
In-Reply-To: <1334818738-14217-1-git-send-email-mikel.astiz.oss@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
Hi Mikel,
On 04/19/2012 01:58 AM, Mikel Astiz wrote:
> Calling ofono_remove_modem() while iterating the hash table is not safe
> given that it can modify the table in hfp_remove().
>
> A simple way to reproduce the problem is to pair some Bluetooth phones
> and remove the Bluetooth adapter, triggering a GLib-CRITICAL assertion.
>
> This patch just removes the update of the hash table inside
> hfp_remove(). This can be safe as long as all calls to
> ofono_modem_remove() are accompanied by a hash table update. The only
> example of this kind right now is hfp_agent_release().
> ---
> plugins/hfp_hf.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
prev parent reply other threads:[~2012-04-19 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 6:58 [PATCH v2] hfp_hf: Fix modifying hash table while iterating Mikel Astiz
2012-04-19 12:41 ` Denis Kenzior [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=4F900814.4030507@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.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