From: Marcel Holtmann <marcel@holtmann.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-bluetooth@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [rfc]btusb with SCO support
Date: Tue, 19 Aug 2008 06:05:54 +0200 [thread overview]
Message-ID: <1219118754.7591.70.camel@violet.holtmann.net> (raw)
In-Reply-To: <200808182326.48365.oliver@neukum.org>
Hi Oliver,
> > > > actually we can't move the URB killing for ACL into notify() since that
> > > > gives me a kernel panic (fatal exception in interrupt).
> > > >
> > > > Your patch for the IRQ disabling doesn't make a difference.
> > >
> > > Please send me the version that triggers it.
> >
> > the attached version makes it oops. Just create a connection with rfcomm
> > or sdptool and you will see it when disconnecting.
>
> This is a context you cannot sleep in:
>
> @@ -504,8 +674,62 @@ static void btusb_notify(struct hci_dev *hdev, unsigned int evt)
>
> BT_DBG("%s evt %d", hdev->name, evt);
>
> - if (evt == HCI_NOTIFY_CONN_ADD || evt == HCI_NOTIFY_CONN_DEL)
> - schedule_work(&data->work);
> + if (hdev->conn_hash.acl_num > 0) {
> + if (!test_and_set_bit(BTUSB_BULK_RUNNING, &data->flags)) {
> + if (btusb_submit_bulk_urb(hdev) < 0)
> + clear_bit(BTUSB_BULK_RUNNING, &data->flags);
> + else
> + btusb_submit_bulk_urb(hdev);
> + }
> + } else {
> + clear_bit(BTUSB_BULK_RUNNING, &data->flags);
> + usb_kill_anchored_urbs(&data->bulk_anchor);
>
> But you use usb_kill_anchored_urbs(). You should use usb_unlink_anchored_urbs()
good catch. That was starring me at the code and not realizing that all
usb_kill_* version need to sleep.
However when using the unlink version, this gives me spinlock lockup
(with and without your IRQ disable patch). From the backtrace it seems
that usb_unanchor_urb is calling spinlock_irq_save here.
Regards
Marcel
next prev parent reply other threads:[~2008-08-19 4:05 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 12:52 [rfc]btusb with SCO support Oliver Neukum
2008-07-31 14:03 ` Marcel Holtmann
2008-07-31 15:21 ` Oliver Neukum
2008-08-01 17:42 ` Marcel Holtmann
2008-08-02 23:47 ` Alan Stern
2008-08-01 10:32 ` Oliver Neukum
2008-08-01 17:43 ` Marcel Holtmann
2008-08-01 11:57 ` Oliver Neukum
2008-08-01 17:45 ` Marcel Holtmann
2008-08-04 8:33 ` Oliver Neukum
2008-08-04 16:05 ` Marcel Holtmann
2008-08-04 16:23 ` Oliver Neukum
2008-08-04 16:33 ` Marcel Holtmann
2008-08-04 17:01 ` Oliver Neukum
2008-08-04 17:25 ` Marcel Holtmann
2008-08-04 18:32 ` Oliver Neukum
2008-08-04 20:24 ` Marcel Holtmann
2008-08-05 11:15 ` Oliver Neukum
2008-08-08 21:14 ` Marcel Holtmann
2008-08-12 20:53 ` Oliver Neukum
2008-08-12 21:36 ` Marcel Holtmann
2008-08-13 15:16 ` Oliver Neukum
2008-08-13 18:23 ` Marcel Holtmann
2008-08-18 10:13 ` Marcel Holtmann
2008-08-18 12:57 ` Oliver Neukum
2008-08-18 13:38 ` Marcel Holtmann
2008-08-18 13:52 ` Oliver Neukum
2008-08-18 14:10 ` Marcel Holtmann
2008-08-18 14:27 ` Oliver Neukum
2008-08-18 14:36 ` Marcel Holtmann
2008-08-18 14:38 ` Oliver Neukum
2008-08-18 15:12 ` Marcel Holtmann
2008-08-18 16:03 ` Oliver Neukum
2008-08-18 17:07 ` Marcel Holtmann
2008-08-18 21:26 ` Oliver Neukum
2008-08-19 4:05 ` Marcel Holtmann [this message]
2008-08-19 7:03 ` Oliver Neukum
2008-08-19 7:19 ` Marcel Holtmann
2008-08-19 7:30 ` Oliver Neukum
2008-08-19 7:52 ` Marcel Holtmann
2008-08-19 14:49 ` Alan Stern
2008-08-19 15:18 ` Marcel Holtmann
2008-08-19 15:53 ` Alan Stern
2008-08-19 18:19 ` Marcel Holtmann
2008-08-19 18:57 ` Alan Stern
2008-08-20 6:39 ` Dave Higton
2008-08-20 13:50 ` Alan Stern
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=1219118754.7591.70.camel@violet.holtmann.net \
--to=marcel@holtmann.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.