From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] hfp_hf: Fix modifying hash table while iterating
Date: Wed, 18 Apr 2012 19:55:11 -0500 [thread overview]
Message-ID: <4F8F626F.3060008@gmail.com> (raw)
In-Reply-To: <CANT-zCUrNSM4xRhwj_CiiCZeJoMV-vDkqKC4pj=Co6y3Q8AhWw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
Hi Mikel,
>> The patch looks absolutely fine, however can you check whether removing
>> g_hashtable_remove from hfp_remove would do the trick as well? We don't
>> seem to be doing this in the sap driver, and I no longer recall whether
>> this was done in hfp_hf to keep valgrind happy or is simply a mistake.
>
> I was reluctant to make such a change because I wasn't entirely sure about
> which assumptions are made by the core about modem removals.
>
> If we know that all calls to ofono_modem_remove() will be originated in
> hfp_hf.c, then your proposal would just work. I will send the corresponding
> patch soon.
The core does not call ofono_modem_remove on its own, this is triggered
by the plugins (e.g. udev, bluetooth). So Under normal circumstances
all calls to ofono_modem_remove would be triggered by BlueZ reporting
something, e.g. adapter removed, device removed, etc.
The only time this might be a problem is during shutdown, hence my
comment about keeping valgrind happy.
Regards,
-Denis
next prev parent reply other threads:[~2012-04-19 0:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 15:19 [PATCH] hfp_hf: Fix modifying hash table while iterating Mikel Astiz
2012-04-18 15:55 ` Denis Kenzior
2012-04-19 6:54 ` Mikel Astiz
2012-04-19 0:55 ` Denis Kenzior [this message]
2012-04-19 17:15 ` Mikel Astiz
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=4F8F626F.3060008@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