From: Johan Hedberg <johan.hedberg@nokia.com>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: linux-bluetooth@vger.kernel.org,
par-gunnar.p.hjalmdahl@stericsson.com,
henrik.possung@stericsson.com
Subject: Re: [PATCH] Fix adapter reference count in input plugin
Date: Fri, 4 Mar 2011 15:38:26 -0300 [thread overview]
Message-ID: <20110304183826.GB21452@jh-x301> (raw)
In-Reply-To: <1299059097-24462-1-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Wed, Mar 02, 2011, Szymon Janc wrote:
> Adapter unref was called on driver removal even if input server
> failed to start on probe and reference was not incremented. This leads
> to segmentation fault while removing adapter.
> ---
> input/manager.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/input/manager.c b/input/manager.c
> index a98a080..259aef7 100644
> --- a/input/manager.c
> +++ b/input/manager.c
> @@ -143,6 +143,9 @@ static void hid_server_remove(struct btd_adapter *adapter)
> {
> bdaddr_t src;
>
> + if (!g_slist_find(adapters, adapter))
> + return;
> +
> adapter_get_address(adapter, &src);
>
> server_stop(&src);
This one looks like it's working around the core issue instead of fixing
it. The _remove function shouldn't get called if _probe failed. I.e. the
issue seems to be somewhere in the core daemon.
Johan
next prev parent reply other threads:[~2011-03-04 18:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-02 9:44 [PATCH] Fix adapter reference count in input plugin Szymon Janc
2011-03-04 18:38 ` Johan Hedberg [this message]
2011-03-04 19:02 ` Szymon Janc
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=20110304183826.GB21452@jh-x301 \
--to=johan.hedberg@nokia.com \
--cc=henrik.possung@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=par-gunnar.p.hjalmdahl@stericsson.com \
--cc=szymon.janc@tieto.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