public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Christoph Hellwig <hch@lst.de>
Cc: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] system freeze in 2.6.17-mh5
Date: Thu, 03 Aug 2006 12:39:39 +0200	[thread overview]
Message-ID: <1154601579.3905.64.camel@aeonflux.holtmann.net> (raw)
In-Reply-To: <20060802210008.GA3043@lst.de>

Hi Christoph,

> > > BUG: scheduling while atomic: swapper/0x00000100/0
> > >  <c02ecbd2> wait_for_completion+0x82/0xb6  <c0115504>
> > > default_wake_function+0x0/0x12 <c0115504>
> > > default_wake_function+0x0/0x12  <c0113c8e> wake_up_process+0xd/0xf
> > > <c02e8b6f> hidp_idle_timeout+0x0/0x10  <c01297e2>
> > > kthread_stop_sem+0x74/0x93 <c012976b> kthread_stop+0xb/0xe  <c01213bb>
> 
> > this looks like a problem with the kthread API. We converted BNEP, CMTP
> > and HIDP to it with 2.6.17-mh3. So a 2.6.17-mh2 kernel should work
> > without any problems.
> > 
> > Christoph, any ideas. Did you see a similar problem before.
> 
> kthread_stop can sleep, hidp_idle_timeout is called from a timer, thus
> running in softirq context.
> 
> Why does hidp try to tear down the thread on this timeout anyway?  It
> seems much more logical to me to only do it in hidp_del_connection so
> that it's symmetric to starting the thread in hidp_add_connection.

previously, it was only marking the connection for disconnect:

        atomic_inc(&session->terminate);
        hidp_schedule(session);

After the conversion to kthread API we call kthread_stop() directly and
this is not gonna work.

The hidp_del_connection() is triggered from userspace to terminate an
active HIDP session. Additionally we also need to terminate the HIDP
session after a certain amount of idle time to safe power. In general
the HID input device itself should take care of this, but some of them
simply don't.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2006-08-03 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 10:07 [Bluez-devel] system freeze in 2.6.17-mh5 Stefan Maintz
2006-08-02 13:37 ` Marcel Holtmann
2006-08-02 17:16   ` Stefan Maintz
2006-08-02 21:00   ` Christoph Hellwig
2006-08-03 10:39     ` Marcel Holtmann [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=1154601579.3905.64.camel@aeonflux.holtmann.net \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=hch@lst.de \
    /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