lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 15 Sep 2008 19:42:36 +0200
From:	Pavel Machek <pavel@...e.cz>
To:	oneukum@...e.de, kernel list <linux-kernel@...r.kernel.org>,
	Linux usb mailing list 
	<linux-usb-devel@...ts.sourceforge.net>
Subject: btusb autosuspend + usb core problems

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ