From: Pavel Machek <pavel@suse.cz>
To: oneukum@suse.de, kernel list <linux-kernel@vger.kernel.org>,
Linux usb mailing list <linux-usb-devel@lists.sourceforge.net>
Subject: btusb autosuspend + usb core problems
Date: Mon, 15 Sep 2008 19:42:36 +0200 [thread overview]
Message-ID: <20080915174236.GA1647@elf.ucw.cz> (raw)
Hi!
With usb bluetooth autosuspend, I get infinite loop in
unlink_anchored_urbs(), called from btusb_flush().
Loop is infinite, because usb_kill_urb can fail
@@ -547,13 +548,16 @@ void usb_kill_urb(struct urb *urb)
static DEFINE_MUTEX(reject_mutex);
might_sleep();
- if (!(urb && urb->dev && urb->ep))
+ if (!(urb && urb->dev && urb->ep)) {
+ printk("killing_urb unsuccessful\n");
return;
+ }
mutex_lock(&reject_mutex);
++urb->reject;
mutex_unlock(&reject_mutex);
(and indeed fails in my case), but does not return value.
usb_kill_anchored_urbs() relies on kill_urb() unlinking it...
spin_lock_irq(&anchor->lock);
while (!list_empty(&anchor->urb_list)) {
victim = list_entry(anchor->urb_list.prev, struct urb,
anchor_list);
+
+ if (complain++ < 10)
+ printk("kill_anchored: victim %lx (prev
%lx)\n", victim, prev_victim);
/* we must make sure the URB isn't freed before we
kill it*/
usb_get_urb(victim);
spin_unlock_irq(&anchor->lock);
@@ -584,8 +594,10 @@ void usb_kill_anchored_urbs(struct usb_a
usb_kill_urb(victim);
usb_put_urb(victim);
spin_lock_irq(&anchor->lock);
+ prev_victim = victim;
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
reply other threads:[~2008-09-15 17:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080915174236.GA1647@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=oneukum@suse.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
all inboxes | Powered by JetHome®